Function at 0x407630
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x5b47a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x33c], ecx
test eax, eax
jne 0x40766b
mov eax, 0x10000
mov dword [0x5b6694], eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004fff81
mov esp, ebp
pop ebp
ret
cmp dword [eax], 1
je 0x407688
mov eax, 0x80000
mov dword [0x5b6694], eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004fff81
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
mov edi, dword [eax + 4]
or esi, 0xffffffff
cmp dword [edi + 4], esi
je 0x4076a1
mov edx, dword [edi]
push edx
call fcn.00405150
add esp, 4
mov eax, dword [edi]
mov ebx, dword [ebp + 0xc]
mov dword [edi + 4], esi
cmp ebx, dword [eax + 4]
jl 0x4076b8
mov eax, 0x10000
jmp 0x40796c
cmp ebx, dword [eax + 0x10]
jge 0x4076c6
push eax
call fcn.00404eb0
add esp, 4
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jge 0x407724
lea ecx, [ecx]
mov esi, dword [edi]
test esi, esi
je 0x40771d
cmp dword [esi + 0x18], 0
je 0x40771d
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x40771d
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push 0
push 0
push 0
push 0
push 0
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
push 0
lea edx, [esi + 0x78]
mov dword [esi + 0x10], eax
push edx
lea eax, [esi + 0x28]
push eax
push esi
call fcn.00404b10
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [edi]
cmp dword [ecx + 0x10], ebx
jl 0x4076d0
lea edx, [ebp - 0x338]
push edx
push ebx
mov ecx, edi
call fcn.004052f0
test byte [ebp - 0x230], 0x10
je 0x40777f
mov ecx, dword [ebp - 0x33c]
mov al, byte [ecx]
cmp al, 0x2f
je 0x407756
cmp al, 0x5c
je 0x407756
test al, al
je 0x407768
cmp byte [ecx + 1], 0x3a
jne 0x407768
push ecx
push 0
call fcn.004058e0
add esp, 8
xor eax, eax
jmp 0x40796c
push ecx
add edi, 0x140
push edi
call fcn.004058e0
add esp, 8
xor eax, eax
jmp 0x40796c
mov ebx, dword [ebp - 0x33c]
mov esi, ebx
mov al, byte [esi]
mov ecx, esi
test al, al
je 0x4077a3
nop
cmp al, 0x2f
je 0x407798
cmp al, 0x5c
jne 0x40779b
lea ebx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x407790
lea edx, [ebp - 0x108]
mov eax, esi
sub edx, esi
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4077b0
cmp ebx, esi
jne 0x407827
mov byte [ebp - 0x108], cl
push ebx
lea ecx, [ebp - 0x108]
push ecx
lea esi, [edi + 0x140]
push esi
lea edx, [ebp - 0x20c]
push 0x56565c
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push esi
call fcn.004058e0
add esp, 0x1c
mov ecx, dword [ebp - 0x230]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x407886
mov eax, 0x200
jmp 0x40796c
mov eax, ebx
sub eax, esi
mov byte [ebp + eax - 0x108], 0
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x407856
cmp al, 0x5c
je 0x407856
test al, al
je 0x4077c4
cmp byte [ebp - 0x107], 0x3a
jne 0x4077c4
push ebx
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x20c]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push 0
call fcn.004058e0
add esp, 0x18
jmp 0x4077f5
mov eax, dword [edi + 0x138]
mov ecx, dword [edi]
push eax
push ecx
call fcn.00407090
add esp, 8
cmp dword [edi + 0x13c], 0
jne 0x4078b4
push 0x4000
call fcn.00407a92
add esp, 4
mov dword [edi + 0x13c], eax
mov dword [ebp - 0x33c], 0
mov edi, edi
mov eax, dword [edi + 0x13c]
mov ecx, dword [edi]
lea edx, [ebp - 0x33d]
push edx
push 0x4000
push eax
push ecx
call fcn.00407210
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x407920
test esi, esi
js 0x407914
jle 0x407907
mov eax, dword [edi + 0x13c]
push 0
lea edx, [ebp - 0x344]
push edx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40792c
cmp byte [ebp - 0x33d], 0
jne 0x407938
test esi, esi
jne 0x4078c0
mov dword [ebp - 0x33c], 0x5000000
jmp 0x407954
mov dword [ebp - 0x33c], 0x1000
jmp 0x407954
mov dword [ebp - 0x33c], 0x400
jmp 0x407954
lea ecx, [ebp - 0x21c]
push ecx
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
push ecx
call fcn.00405150
mov eax, dword [ebp - 0x33c]
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
mov dword [0x5b6694], eax
call fcn.004fff81
mov esp, ebp
pop ebp
ret