Function at 0x403a97
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, 0x8000
push esi
mov esi, 0x41ac50
push ebx
sub esp, 0x9c
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x10], 0
cmovne edi, dword [ebp + 0x14]
cmovne esi, dword [ebp + 0x10]
test eax, eax
js 0x403acf
add eax, dword [0x426b74]
mov dword [esp], eax
call fcn.00403a65
push ebx
lea eax, [ebp - 0x20]
mov ebx, 0xfffffffd
mov dword [esp + 4], 4
mov dword [esp], eax
call fcn.00403a19
test eax, eax
push ecx
push ecx
je 0x403d2d
mov eax, dword [ebp - 0x20]
test eax, eax
jns 0x403c91
mov edx, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
mov dword [ebp - 0x80], edx
call edx
mov ecx, 0x422c50
mov dword [ebp - 0x74], eax
call fcn.0040832c
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x80]
and eax, 0x7fffffff
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x6c], edx
jmp 0x403c81
cmp eax, 0x4000
mov edx, 0x4000
cmovle edx, eax
mov dword [esp + 4], edx
mov dword [ebp - 0x80], edx
mov dword [esp], 0x416c50
call fcn.00403a19
test eax, eax
push edx
push edx
mov edx, dword [ebp - 0x80]
je 0x403d21
sub dword [ebp - 0x20], edx
mov dword [0x422c68], 0x416c50
mov dword [0x422c6c], edx
mov ecx, 0x422c50
mov dword [0x422c70], esi
mov dword [0x422c74], edi
call fcn.00408362
test eax, eax
mov dword [ebp - 0x78], eax
js 0x403d1a
mov edx, dword [0x422c70]
sub edx, esi
mov dword [ebp - 0x80], edx
call dword [ebp - 0x6c]
mov edx, dword [ebp - 0x80]
test byte [0x426b2c], 1
mov dword [ebp - 0x7c], eax
je 0x403c1d
sub eax, dword [ebp - 0x74]
cmp eax, 0xc8
ja 0x403bbd
cmp dword [ebp - 0x20], 0
jne 0x403c1d
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x80], edx
mov dword [esp + 4], 0x64
mov dword [esp + 8], eax
sub eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x84], ecx
sub esp, 0xc
mov dword [esp], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], str....__d__
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [ebp - 0x84]
mov dword [esp], 0
mov dword [esp + 4], ecx
call fcn.00406b92
mov edx, dword [ebp - 0x80]
push eax
push eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x74], eax
test edx, edx
je 0x403c81
cmp dword [ebp + 0x10], 0
jne 0x403c68
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov dword [ebp - 0x80], edx
mov dword [esp + 0x10], 0
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x80]
sub esp, 0x14
test eax, eax
je 0x403d28
cmp dword [ebp - 0x1c], edx
jne 0x403d28
add ebx, edx
jmp 0x403c72
mov esi, dword [0x422c70]
add ebx, edx
sub edi, edx
cmp dword [ebp - 0x78], 1
jne 0x403b6f
jmp 0x403d2d
mov eax, dword [ebp - 0x20]
test eax, eax
jg 0x403b2f
jmp 0x403d2d
cmp dword [ebp + 0x10], 0
jne 0x403cf9
jmp 0x403cee
cmp edi, esi
cmovle esi, edi
mov dword [esp + 4], esi
mov dword [esp], 0x416c50
call fcn.00403a19
test eax, eax
push ecx
push ecx
je 0x403d21
lea edx, [ebp - 0x1c]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x416c50
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x403d28
cmp esi, dword [ebp - 0x1c]
jne 0x403d28
add ebx, esi
sub dword [ebp - 0x20], esi
jmp 0x403cf0
xor ebx, ebx
mov esi, dword [ebp - 0x20]
test esi, esi
jg 0x403c99
jmp 0x403d2d
mov esi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
cmovg esi, eax
mov dword [esp], edx
mov dword [esp + 4], esi
call fcn.00403a19
test eax, eax
push edx
cmovne ebx, esi
push edx
jmp 0x403d2d
mov ebx, 0xfffffffc
jmp 0x403d2d
mov ebx, 0xfffffffd
jmp 0x403d2d
mov ebx, 0xfffffffe
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x10