Function at 0x4596c1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
mov eax, dword [0x5164b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
cmp dword [edi + 4], 0xffffffff
je 0x4596e9
mov ecx, dword [edi]
call fcn.00458efe
mov ecx, dword [edi]
or dword [edi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [ecx + 4]
jl 0x45970f
mov eax, 0x10000
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a5088
mov esp, ebp
pop ebp
ret 0x10
cmp ebx, dword [ecx + 0x10]
jge 0x459722
call fcn.00458970
jmp 0x459722
mov ecx, dword [edi]
call fcn.004589a7
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x45971b
lea eax, [ebp - 0x348]
mov ecx, edi
push eax
push ebx
call fcn.00459013
test byte [ebp - 0x240], 0x10
mov al, byte [esi]
je 0x45976a
cmp al, 0x2f
je 0x45975d
cmp al, 0x5c
je 0x45975d
test al, al
je 0x459755
cmp byte [esi + 1], 0x3a
je 0x45975d
lea ecx, [edi + 0x140]
jmp 0x45975f
xor ecx, ecx
mov edx, esi
call fcn.004595bd
xor eax, eax
jmp 0x4596fc
mov dword [ebp - 0x350], esi
mov ebx, esi
mov ecx, esi
test al, al
je 0x459790
cmp al, 0x2f
je 0x459780
cmp al, 0x5c
jne 0x459783
lea ebx, [ecx + 1]
inc ecx
mov al, byte [ecx]
test al, al
jne 0x459778
mov dword [ebp - 0x350], ebx
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x459795
sub ecx, edx
push esi
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.004a8c06
add esp, 0xc
cmp ebx, esi
jne 0x4597c0
xor ebx, ebx
mov byte [ebp - 0x110], bl
jmp 0x4597f3
mov eax, ebx
sub eax, esi
cmp eax, 0x104
jae 0x45994b
xor ebx, ebx
mov byte [ebp + eax - 0x110], bl
mov al, byte [ebp - 0x110]
cmp al, 0x2f
je 0x459820
cmp al, 0x5c
je 0x459820
test al, al
je 0x4597f3
cmp byte [ebp - 0x10f], 0x3a
je 0x459820
push dword [ebp - 0x350]
lea eax, [ebp - 0x110]
push eax
lea esi, [edi + 0x140]
push esi
lea eax, [ebp - 0x218]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
mov ecx, esi
jmp 0x459844
push dword [ebp - 0x350]
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x218]
push 0x4f0744
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
xor ecx, ecx
lea edx, [ebp - 0x110]
call fcn.004595bd
push ebx
push dword [ebp - 0x240]
lea eax, [ebp - 0x218]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x350], eax
cmp eax, 0xffffffff
jne 0x459881
mov eax, 0x200
jmp 0x4596fc
mov edx, dword [edi + 0x138]
mov ecx, dword [edi]
call fcn.00458b8d
cmp dword [edi + 0x13c], ebx
jne 0x4598a7
push 0x4000
call fcn.00490848
pop ecx
mov dword [edi + 0x13c], eax
mov edx, dword [edi + 0x13c]
lea eax, [ebp - 0x349]
mov ecx, dword [edi]
push eax
push 0x4000
call fcn.00458cdd
mov esi, eax
pop ecx
pop ecx
cmp esi, 0xffffff96
je 0x45992c
test esi, esi
js 0x4598fb
jle 0x4598ee
push ebx
lea eax, [ebp - 0x354]
push eax
push esi
push dword [edi + 0x13c]
push dword [ebp - 0x350]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x459902
cmp byte [ebp - 0x349], 0
jne 0x459909
test esi, esi
jne 0x4598a7
mov ebx, 0x5000000
jmp 0x459931
mov ebx, 0x400
jmp 0x459931
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 0x350]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x459931
mov ebx, 0x1000
push dword [ebp - 0x350]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
call fcn.00458efe
mov eax, ebx
jmp 0x4596fc
call fcn.004a7a9c
int3