Function at 0x403af7
Capabilities:
Write file on windows

Disassembly:
push ebp
mov edx, 0x8000
mov ebp, esp
push edi
push esi
push ebx
mov edi, 0x417c60
sub esp, 0x9c
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
test esi, esi
cmovne edx, ebx
cmovne edi, esi
test eax, eax
mov dword [ebp - 0x6c], edx
js 0x403b34
add eax, dword [0x436978]
mov dword [esp], eax
call fcn.00403ac5
push ecx
lea eax, [ebp - 0x60]
mov dword [esp + 4], 4
mov dword [esp], eax
call fcn.00403a7d
test eax, eax
push edx
push edx
je 0x403d81
mov eax, dword [ebp - 0x60]
test eax, eax
jns 0x403d1d
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x60]
mov dword [0x427c90], 8
mov dword [0x4281ac], 0
mov dword [0x4281a8], 0
mov dword [0x431838], 0x429830
and eax, 0x7fffffff
mov dword [0x431834], 0x429830
mov dword [0x431830], 0x431830
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x80], ebx
mov eax, dword [ebp - 0x60]
test eax, eax
jle 0x403d15
cmp eax, 0x4000
mov ebx, 0x4000
mov dword [esp], 0x413c60
cmovle ebx, eax
mov dword [esp + 4], ebx
call fcn.00403a7d
test eax, eax
push ecx
push ecx
je 0x403d81
sub dword [ebp - 0x60], ebx
mov dword [0x427c80], 0x413c60
mov dword [0x427c84], ebx
mov eax, dword [ebp - 0x6c]
mov dword [esp], 0x427c80
mov dword [0x427c88], edi
mov dword [0x427c8c], eax
call fcn.00408c4f
test eax, eax
push edx
mov dword [ebp - 0x7c], eax
js 0x403d0b
mov ebx, dword [0x427c88]
mov eax, dword [ebp - 0x80]
call eax
mov edx, eax
sub ebx, edi
test byte [0x436914], 1
je 0x403cab
sub eax, dword [ebp - 0x78]
cmp eax, 0xc8
ja 0x403c4e
cmp dword [ebp - 0x60], 0
jne 0x403cab
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x84], edx
mov dword [esp + 4], 0x64
mov dword [esp + 8], eax
sub eax, dword [ebp - 0x60]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
lea ecx, [ebp - 0x58]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], str....__d__
mov dword [esp], ecx
mov dword [ebp - 0x78], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [ebp - 0x78]
mov dword [esp], 0
mov dword [esp + 4], ecx
call fcn.00406dbb
mov edx, dword [ebp - 0x84]
push eax
push eax
mov dword [ebp - 0x78], edx
test ebx, ebx
je 0x403bbb
test esi, esi
jne 0x403cf3
lea eax, [ebp - 0x5c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x403d88
cmp ebx, dword [ebp - 0x5c]
jne 0x403d88
add dword [ebp - 0x70], ebx
jmp 0x403cff
add dword [ebp - 0x70], ebx
sub dword [ebp - 0x6c], ebx
mov edi, dword [0x427c88]
cmp dword [ebp - 0x7c], 1
jne 0x403c00
jmp 0x403d15
mov eax, 0xfffffffc
jmp 0x403da8
mov eax, dword [ebp - 0x70]
jmp 0x403da8
test esi, esi
jne 0x403d8f
xor ebx, ebx
lea esi, [ebp - 0x58]
jmp 0x403d5d
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], 0x413c60
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x403d88
cmp edi, dword [ebp - 0x58]
jne 0x403d88
sub dword [ebp - 0x60], edi
add ebx, edi
mov edi, dword [ebp - 0x60]
test edi, edi
jle 0x403da6
cmp edi, dword [ebp - 0x6c]
mov dword [esp], 0x413c60
cmovg edi, dword [ebp - 0x6c]
mov dword [esp + 4], edi
call fcn.00403a7d
test eax, eax
push ecx
push ecx
jne 0x403d28
mov eax, 0xfffffffd
jmp 0x403da8
mov eax, 0xfffffffe
jmp 0x403da8
cmp ebx, eax
mov dword [esp], esi
cmovg ebx, eax
mov dword [esp + 4], ebx
call fcn.00403a7d
test eax, eax
push edx
push edx
je 0x403d81
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10