Function at 0x403a97
Capabilities:
Write file on windows

Disassembly:
push ebp
mov edx, 0x41bc50
mov ebp, esp
push edi
mov edi, 0x8000
push esi
push ebx
sub esp, 0x9c
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
cmp dword [ebp + 0x10], 0
cmovne edx, dword [ebp + 0x10]
cmovne edi, esi
test eax, eax
mov dword [ebp - 0x70], edx
js 0x403ad4
add eax, dword [0x7a63b0]
mov dword [esp], eax
call fcn.00403a65
push eax
lea eax, [ebp - 0x20]
mov dword [esp + 4], 4
mov dword [esp], eax
call fcn.00403a19
test eax, eax
push ebx
push ebx
mov ebx, 0xfffffffd
je 0x403d29
mov eax, dword [ebp - 0x20]
test eax, eax
jns 0x403c91
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
call esi
mov edx, dword [ebp - 0x20]
mov byte [0x423c60], 0xb
mov dword [0x423c78], 0
mov dword [ebp - 0x6c], esi
and edx, 0x7fffffff
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x20], edx
jmp 0x403c81
cmp eax, 0x4000
mov esi, 0x4000
cmovle esi, eax
mov dword [esp + 4], esi
mov dword [esp], 0x417c50
call fcn.00403a19
test eax, eax
push ecx
push ecx
je 0x403d1d
sub dword [ebp - 0x20], esi
mov dword [0x423c50], 0x417c50
mov dword [0x423c54], esi
mov edx, dword [ebp - 0x70]
mov dword [0x423c5c], edi
mov dword [esp], 0x423c50
mov dword [0x423c58], edx
call fcn.00408328
test eax, eax
push edx
mov dword [ebp - 0x7c], eax
js 0x403d16
mov esi, dword [0x423c58]
sub esi, dword [ebp - 0x70]
call dword [ebp - 0x6c]
test byte [0x7a6368], 1
mov ecx, eax
je 0x403c1d
sub eax, dword [ebp - 0x78]
cmp eax, 0xc8
ja 0x403bbe
cmp dword [ebp - 0x20], 0
jne 0x403c1d
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x80], ecx
mov dword [esp + 4], 0x64
mov eax, edx
sub eax, dword [ebp - 0x20]
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
lea edx, [ebp - 0x60]
mov dword [ebp - 0x84], edx
sub esp, 0xc
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str....__d__
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [ebp - 0x84]
mov dword [esp], 0
mov dword [esp + 4], edx
call fcn.00406b8e
mov ecx, dword [ebp - 0x80]
mov dword [ebp - 0x78], ecx
push eax
push eax
test esi, esi
je 0x403c81
cmp dword [ebp + 0x10], 0
jne 0x403c65
mov edx, dword [ebp - 0x70]
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov edx, dword [ebp + 0xc]
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x403d24
cmp dword [ebp - 0x1c], esi
jne 0x403d24
add ebx, esi
jmp 0x403c72
mov edx, dword [0x423c58]
add ebx, esi
sub edi, esi
mov dword [ebp - 0x70], edx
cmp dword [ebp - 0x7c], 4
jne 0x403b70
jmp 0x403d29
mov eax, dword [ebp - 0x20]
test eax, eax
jg 0x403b36
jmp 0x403d29
cmp dword [ebp + 0x10], 0
jne 0x403cf9
jmp 0x403cee
cmp edi, esi
cmovle esi, edi
mov dword [esp + 4], esi
mov dword [esp], 0x417c50
call fcn.00403a19
test eax, eax
push ecx
push ecx
je 0x403d1d
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0x417c50
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x403d24
cmp esi, dword [ebp - 0x1c]
jne 0x403d24
add ebx, esi
sub dword [ebp - 0x20], esi
jmp 0x403cf0
xor ebx, ebx
mov esi, dword [ebp - 0x20]
test esi, esi
jg 0x403c99
jmp 0x403d29
mov edx, dword [ebp + 0x10]
cmp esi, eax
cmovg esi, eax
mov dword [esp + 4], esi
mov dword [esp], edx
call fcn.00403a19
test eax, eax
push edx
cmovne ebx, esi
push edx
jmp 0x403d29
mov ebx, 0xfffffffc
jmp 0x403d29
mov ebx, 0xfffffffd
jmp 0x403d29
mov ebx, 0xfffffffe
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x10