Function at 0x40f9b0
Capabilities:
Write file on windows

Disassembly:
push ebp
push esp
pop ebp
sub esp, 0x420
mov eax, dword [ebp + 8]
cmp eax, dword [0x439f9c]
jae 0x40f9e3
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0x439e60]
movsx ecx, byte [eax + edx*8 + 4]
and ecx, 1
or ecx, ecx
jne 0x40f9ff
mov dword [0x438658], 9
mov dword [0x43865c], 0
or eax, 0xffffffff
jmp 0x40fc4e
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x420], edx
cmp dword [ebp + 0x10], 0
jne 0x40fa1c
sub eax, eax
jmp 0x40fc4e
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0x439e60]
movsx eax, byte [edx + ecx*8 + 4]
and eax, 0x20
or eax, eax
je 0x40fa4b
push 2
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f8c0
add esp, 0xc
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x439e60]
movsx edx, byte [ecx + eax*8 + 4]
and edx, 0x80
or edx, edx
je 0x40fb79
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp + 0x10]
jae 0x40fb77
lea edx, [ebp - 0x414]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
lea ecx, [ebp - 0x414]
sub eax, ecx
cmp eax, 0x400
jge 0x40fb07
mov edx, dword [ebp - 4]
sub edx, dword [ebp + 0xc]
cmp edx, dword [ebp + 0x10]
jae 0x40fb07
mov eax, dword [ebp - 4]
mov cl, byte [eax]
mov byte [ebp - 0x41c], cl
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
movsx eax, byte [ebp - 0x41c]
cmp eax, 0xa
jne 0x40faf1
mov ecx, dword [ebp - 0x420]
add ecx, 1
mov dword [ebp - 0x420], ecx
mov edx, dword [ebp - 8]
mov byte [edx], 0xd
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov dl, byte [ebp - 0x41c]
mov byte [ecx], dl
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
jmp 0x40fa96
push 0
lea ecx, [ebp - 0x418]
push ecx
mov edx, dword [ebp - 8]
lea eax, [ebp - 0x414]
sub edx, eax
push edx
lea ecx, [ebp - 0x414]
push ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x439e60]
mov edx, dword [ecx + eax*8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40fb67
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x418]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
lea edx, [ebp - 0x414]
sub ecx, edx
cmp dword [ebp - 0x418], ecx
jge 0x40fb65
jmp 0x40fb77
jmp 0x40fb72
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
jmp 0x40fb77
jmp 0x40fa7e
jmp 0x40fbc6
push 0
lea eax, [ebp - 0x418]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0x439e60]
mov eax, dword [edx + ecx*8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40fbbd
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0x418]
mov dword [ebp - 0x10], ecx
jmp 0x40fbc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x10], 0
jne 0x40fc45
cmp dword [ebp - 0xc], 0
je 0x40fbfe
cmp dword [ebp - 0xc], 5
jne 0x40fbed
mov dword [0x438658], 9
mov edx, dword [ebp - 0xc]
mov dword [0x43865c], edx
jmp 0x40fbf9
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040ff50
add esp, 4
or eax, 0xffffffff
jmp 0x40fc4e
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0x439e60]
movsx ecx, byte [eax + edx*8 + 4]
and ecx, 0x40
or ecx, ecx
je 0x40fc2c
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
cmp eax, 0x1a
jne 0x40fc2c
xor eax, eax
jmp 0x40fc4e
mov dword [0x438658], 0x1c
mov dword [0x43865c], 0
or eax, 0xffffffff
jmp 0x40fc4e
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x420]
push ebp
pop esp
pop ebp
ret