Function at 0x418690
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xac
mov edx, dword [ebp + 0xc]
mov al, byte [edx]
mov dword [ebp - 0xb0], 0
test al, al
je 0x4186e6
mov esi, edx
cmp al, 0x25
je 0x41870c
mov esi, edx
inc esi
mov al, byte [esi]
cmp al, 0x25
je 0x4186c2
test al, al
jne 0x4186b7
cmp esi, edx
je 0x4186dc
mov eax, dword [ebp + 8]
push eax
mov eax, esi
sub eax, edx
push eax
push 1
push edx
call sub.msvcrt.dll_fwrite
mov al, byte [esi]
add esp, 0x10
cmp al, 0x25
je 0x41870c
mov edx, esi
test al, al
jne 0x4186af
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4186f6
mov eax, dword [0x521e88]
test eax, eax
jne 0x418744
mov eax, dword [ebp - 0xb0]
test eax, eax
jne 0x418f4f
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esi + 1]
add esi, 2
mov al, byte [eax]
sub eax, 0x25
cmp al, 0x51
jbe 0x418738
push ecx
mov edx, dword [ebp + 8]
movsx eax, byte [esi - 1]
push eax
push str.___c
push edx
call fcn.00418610
mov al, byte [esi]
add esp, 0x10
mov edx, esi
jmp 0x4186e2
and eax, 0xff
jmp dword [eax*4 + 0x4ba9b0]
mov dword [0x521e64], 0
jmp 0x4186f6
mov edx, dword [ebp + 0x10]
push eax
lea ebx, [ebp - 0x9c]
mov edi, dword [edx]
push edi
push 0x4ba8f0
push ebx
call fcn.00418670
mov dl, byte [ebp - 0x9c]
add esp, 0x10
mov eax, ebx
cmp dl, 0x30
jne 0x418780
inc eax
mov dl, byte [eax]
cmp dl, 0x30
je 0x418778
cmp dl, 1
mov ebx, dword [ebp + 0x10]
sbb eax, 0
mov edx, dword [ebp + 8]
add ebx, 4
push ecx
mov dword [ebp + 0x10], ebx
push ecx
push edx
push eax
call sub.msvcrt.dll_fputs
mov al, byte [esi]
add esp, 0x10
mov edx, esi
jmp 0x4186e2
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
dec eax
mov dword [edx + 4], eax
test eax, eax
js 0x418f36
mov eax, dword [edx]
mov byte [eax], 0x25
inc eax
mov dword [edx], eax
mov edx, esi
mov al, byte [esi]
jmp 0x4186e2
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0x10]
add edi, 4
mov ebx, dword [eax]
mov edx, dword [ebx + 0x94]
push eax
mov eax, dword [ebx]
mov dword [ebp - 0xac], edx
push eax
mov eax, dword [ebp + 8]
push 0x4ba905
push eax
call fcn.00418610
mov eax, dword [ebp - 0xac]
add esp, 0x10
test eax, eax
je 0x41881e
mov edx, dword [ebp - 0xac]
mov eax, dword [edx + 4]
mov eax, dword [eax + 4]
cmp eax, 5
je 0x418ebe
cmp eax, 2
je 0x418e7c
mov al, byte [esi]
mov edx, esi
mov dword [ebp + 0x10], edi
jmp 0x4186e2
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
add ebx, 4
mov eax, dword [edx]
test eax, eax
je 0x418f25
mov ecx, dword [eax + 0x8c]
test ecx, ecx
je 0x418851
test byte [ecx + 0x2c], 1
je 0x418e6c
push edx
mov eax, dword [eax]
push eax
push 0x4ba905
mov eax, dword [ebp + 8]
push eax
call fcn.00418610
mov al, byte [esi]
add esp, 0x10
mov edx, esi
mov dword [ebp + 0x10], ebx
jmp 0x4186e2
mov edx, dword [ebp + 0x10]
mov eax, edx
mov ebx, dword [edx]
add eax, 8
mov edx, dword [edx + 4]
mov dword [ebp - 0xa8], edx
mov edx, dword [ebp + 0x10]
add edx, 0xc
mov eax, dword [eax]
mov dword [ebp + 0x10], edx
mov dword [ebp - 0xa4], eax
test ebx, ebx
je 0x418ce8
sub esp, 0xc
push ebx
call fcn.0042cb50
add esp, 0x10
test eax, eax
je 0x418e57
lea edx, [ebp - 0x18]
mov eax, dword [ebx + 4]
push 0
push edx
lea edx, [ebp - 0x14]
mov edi, dword [ebp - 0xa4]
push edx
mov ecx, dword [ebp - 0xa8]
lea edx, [ebp - 0x10]
push edx
push edi
push ecx
mov edx, dword [ebx + 0x78]
push edx
push ebx
call dword [eax + 0x128]
add esp, 0x20
test eax, eax
je 0x418ce8
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x418f59
lea eax, [esi - 1]
mov dword [ebp - 0xb4], eax
mov al, byte [esi - 1]
cmp al, 0x43
je 0x418d95
cmp al, 0x48
je 0x418d95
mov edi, dword [ebp + 8]
push eax
push ebx
push 0x4ba97d
push edi
mov edi, 1
call fcn.00418fb0
add esp, 0x10
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x418940
mov ecx, dword [ebp + 8]
push ebx
push eax
push 0x4ba981
push ecx
call fcn.00418610
add esp, 0x10
mov eax, dword [ebp - 0xb4]
mov dl, byte [eax]
cmp dl, 0x48
setne al
xor ebx, ebx
mov bl, al
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x418962
cmp dl, 0x47
je 0x418f0d
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x418d00
mov edx, dword [ebp - 0x18]
test edx, edx
je 0x418d00
mov eax, 0x4ba988
test ebx, ebx
jne 0x418986
mov eax, 0x4ba989
push eax
mov eax, dword [ebp + 8]
push edx
push str._u_s
push eax
call fcn.00418610
add esp, 0x10
test ebx, ebx
jne 0x418d1f
jmp 0x418d00
call fcn.00423710
sub esp, 0xc
push eax
call fcn.00424a70
add esp, 0xc
push eax
mov ecx, dword [ebp + 8]
push 0x4ba905
push ecx
call fcn.00418610
mov al, byte [esi]
add esp, 0x10
mov edx, esi
jmp 0x4186e2
push eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
mov eax, dword [eax]
add ebx, 4
push eax
push 0x4ba8f0
jmp 0x41885a
mov eax, dword [ebp + 0x10]
push edi
mov ebx, dword [eax]
push ebx
lea ebx, [ebp - 0x9c]
push 0x4ba8f0
push ebx
call fcn.00418670
mov al, byte [ebp - 0x9c]
add esp, 0x10
mov edi, ebx
cmp al, 0x30
jne 0x418a17
inc edi
mov al, byte [edi]
cmp al, 0x30
je 0x418a10
cmp al, 1
sbb edi, 0
sub esp, 0xc
push edi
call sub.msvcrt.dll_strlen
add esp, 0x10
mov ebx, eax
cmp eax, 7
jle 0x418a3f
jmp 0x418a63
mov eax, dword [edx]
inc ebx
mov byte [eax], 0x20
inc eax
mov dword [edx], eax
cmp ebx, 8
je 0x418a63
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
dec eax
mov dword [edx + 4], eax
test eax, eax
jns 0x418a31
mov edx, dword [ebp + 8]
inc ebx
push ecx
push ecx
push edx
push 0x20
call sub.msvcrt.dll__flsbuf
add esp, 0x10
cmp ebx, 8
jne 0x418a3f
mov eax, dword [ebp + 0x10]
add eax, 4
mov dword [ebp + 0x10], eax
push eax
mov eax, dword [ebp + 8]
push edi
push str.0x_s
push eax
call fcn.00418610
mov al, byte [esi]
add esp, 0x10
mov edx, esi
jmp 0x4186e2
mov dword [0x521e64], 0
mov edx, esi
mov al, byte [esi]
jmp 0x4186e2
mov edx, dword [ebp + 0x10]
push ecx
mov ebx, dword [ebp + 0x10]
mov edx, dword [edx]
add ebx, 4
push edx
push 0x4ba99d
jmp 0x41885a
mov al, byte [esi]
cmp al, 0x64
je 0x418ede
cmp al, 0x75
jne case.0x41873d.0
push eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
mov eax, dword [eax]
add ebx, 4
push eax
push 0x4ba9a7
mov edi, dword [ebp + 8]
inc esi
push edi
call fcn.00418610
mov al, byte [esi]
add esp, 0x10
mov edx, esi
mov dword [ebp + 0x10], ebx
jmp 0x4186e2
mov edx, dword [ebp + 0x10]
push eax
mov ebx, dword [ebp + 0x10]
mov eax, dword [edx]
add ebx, 4
push eax
push 0x4ba99a
jmp 0x41885a
push eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
mov edi, dword [eax]
add ebx, 4
push edi
push 0x4ba905
jmp 0x41885a
push eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
mov eax, dword [eax]
add ebx, 4
push eax
push 0x4ba9a0
jmp 0x41885a
mov ebx, dword [0x521ed0]
push edi
push ebx
jmp 0x4189b8
mov eax, dword [ebp + 0x10]
sub esp, 0xc
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov edx, dword [eax]
add ebx, 4
mov eax, dword [edx + 0xc]
mov eax, dword [eax + 0x20]
push eax
mov eax, dword [edx + 8]
push eax
mov eax, dword [edx]
mov eax, dword [eax]
mov edi, dword [eax + 4]
push edi
push str._s0x_v__type__s_
push ecx
call fcn.00418fb0
mov al, byte [esi]
add esp, 0x20
mov edx, esi
mov dword [ebp + 0x10], ebx
jmp 0x4186e2
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
add ebx, 4
mov eax, dword [edx]
test eax, eax
je 0x418ef5
mov edx, dword [eax + 8]
test edx, edx
je 0x418d7d
mov eax, dword [eax + 4]
push eax
push edx
push str._s:_u
jmp 0x41885a
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
add eax, 4
mov ebx, dword [edx]
mov dword [ebp - 0xa0], eax
test ebx, ebx
je 0x418cc3
cmp byte [ebx], 0
je 0x418cc3
mov eax, dword [0x521ef0]
test eax, eax
je 0x418d89
mov edi, dword [0x521ff0]
push eax
push 3
push ebx
push edi
call fcn.00423da0
add esp, 0x10
mov edi, eax
test eax, eax
je 0x418d89
mov edx, dword [ebp + 8]
push ecx
push eax
push 0x4ba905
push edx
call fcn.00418610
mov dword [esp], edi
call sub.msvcrt.dll_free
mov edx, dword [ebp - 0xa0]
mov al, byte [esi]
add esp, 0x10
mov dword [ebp + 0x10], edx
mov edx, esi
jmp 0x4186e2
mov al, byte [esi]
mov edx, esi
mov dword [ebp - 0xb0], 1
jmp 0x4186e2
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0x10]
add edi, 4
mov ebx, dword [eax]
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + 0x8c]
test eax, eax
je 0x418c5a
test byte [eax + 0x2c], 1
je 0x418e3d
push eax
mov eax, dword [ebx + 0xc]
push eax
mov eax, dword [ebp + 8]
push 0x4ba905
push eax
call fcn.00418610
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + 0x8c]
add esp, 0x10
test eax, eax
je 0x418c87
test byte [eax + 0x2c], 1
je 0x41881e
push eax
push eax
mov ecx, dword [ebx + 8]
push ecx
mov edx, dword [ebx + 0xc]
push edx
call fcn.0048f1f0
add esp, 0x10
test eax, eax
je 0x41881e
push eax
mov eax, dword [ebx + 8]
push eax
push 0x4ba926
mov eax, dword [ebp + 8]
push eax
call fcn.00418610
mov al, byte [esi]
add esp, 0x10
mov edx, esi
mov dword [ebp + 0x10], edi
jmp 0x4186e2
push eax
push eax
push str.no_symbol
mov eax, dword [ebp + 8]
push eax
call fcn.00418610
mov edx, dword [ebp - 0xa0]
mov al, byte [esi]
add esp, 0x10
mov dword [ebp + 0x10], edx
mov edx, esi
jmp 0x4186e2
mov edx, dword [ebp + 8]
push ecx
push ebx
push 0x4ba97d
push edx
mov edi, 1
call fcn.00418fb0
add esp, 0x10
mov eax, dword [ebp - 0xa4]
push eax
mov eax, dword [ebp - 0xa8]
push eax
mov eax, dword [ebp + 8]
push str.__A0x_v_
push eax
call fcn.00418fb0
add esp, 0x10
test edi, edi
je 0x418d74
mov eax, dword [0x51c608]
mov dword [0x51c618], 0
test eax, eax
je 0x418d4c
sub esp, 0xc
push eax
call sub.msvcrt.dll_free
mov dword [0x51c608], 0
add esp, 0x10
mov eax, dword [0x51c5f8]
test eax, eax
je 0x418d74
sub esp, 0xc
push eax
call sub.msvcrt.dll_free
mov dword [0x51c5f8], 0
add esp, 0x10
mov al, byte [esi]
mov edx, esi
jmp 0x4186e2
mov al, byte [esi]
mov edx, esi
jmp 0x4186e2
mov al, byte [esi]
mov edx, esi
mov dword [ebp + 0x10], ebx
jmp 0x4186e2
push eax
push ebx
push 0x4ba905
jmp 0x418cca
mov eax, dword [0x51c618]
test eax, eax
je 0x418dba
mov edx, dword [0x51c608]
test edx, edx
je 0x418dba
mov edi, dword [0x51c5f8]
test edi, edi
je 0x418dba
cmp ebx, eax
je 0x418f67
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
push ebx
push str._B:_In_function___T:_n
push eax
call fcn.00418fb0
mov eax, dword [0x51c608]
add esp, 0x10
mov dword [0x51c618], ebx
test eax, eax
je 0x418deb
sub esp, 0xc
push eax
call sub.msvcrt.dll_free
add esp, 0x10
mov eax, dword [ebp - 0x10]
mov dword [0x51c608], 0
test eax, eax
je 0x418e0d
sub esp, 0xc
push eax
call fcn.00488700
add esp, 0x10
mov dword [0x51c608], eax
mov eax, dword [0x51c5f8]
test eax, eax
je 0x418e22
sub esp, 0xc
push eax
call sub.msvcrt.dll_free
add esp, 0x10
sub esp, 0xc
mov eax, dword [ebp - 0x14]
xor edi, edi
push eax
call fcn.00488700
add esp, 0x10
mov dword [0x51c5f8], eax
jmp 0x418926
push edx
mov eax, dword [eax]
push eax
mov eax, dword [ebp + 8]
push 0x4ba921
push eax
call fcn.00418610
add esp, 0x10
jmp 0x418c5a
push eax
push eax
push ebx
push 0x4ba944
call fcn.00419060
add esp, 0x10
jmp 0x4188b2
mov edi, dword [eax]
push edi
mov ecx, dword [ecx]
push ecx
push 0x4ba91a
jmp 0x41885a
mov eax, dword [ebx + 0x94]
mov eax, dword [eax + 4]
cmp dword [eax + 4], 2
jne 0x41881e
mov eax, dword [ebx + 0x8c]
test eax, eax
je 0x41881e
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x41881e
mov eax, dword [eax]
test eax, eax
je 0x41881e
push edx
push eax
push 0x4ba908
jmp 0x418cab
mov eax, dword [ebx + 0x8c]
mov ecx, dword [eax + 0x7c]
test ecx, ecx
je 0x41881e
test byte [ebx + 0x17], 2
jne 0x41881e
mov eax, dword [eax + 0x74]
jmp 0x418eaa
mov edx, dword [ebp + 0x10]
push eax
mov ebx, dword [ebp + 0x10]
mov eax, dword [edx]
add ebx, 4
push eax
push 0x4ba9a3
jmp 0x418ad6
call fcn.00404320
mov dword [ebp - 0x30], eax
mov eax, dword [0x4a500c]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
jmp 0x418b92
push edx
push eax
mov eax, dword [ebp + 8]
push 0x4ba985
push eax
call fcn.00418fb0
add esp, 0x10
jmp 0x418999
push eax
mov eax, dword [0x521ed0]
push eax
push str._s_generated
jmp 0x41885a
push eax
push eax
mov eax, dword [ebp + 8]
push eax
push 0x25
call sub.msvcrt.dll__flsbuf
mov al, byte [esi]
add esp, 0x10
mov edx, esi
jmp 0x4186e2
sub esp, 0xc
push 1
call fcn.0048eba0
lea edx, [esi - 1]
mov dword [ebp - 0xb4], edx
jmp 0x41890e
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x418f82
push ecx
push ecx
push eax
push edx
call fcn.0048f1f0
add esp, 0x10
test eax, eax
jne 0x418dba
mov eax, dword [ebp - 0x14]
push edx
push edx
push eax
mov eax, dword [0x51c5f8]
xor edi, edi
push eax
call sub.msvcrt.dll_strcmp
add esp, 0x10
test eax, eax
je 0x418926
jmp 0x418dba