Function at 0x42f990
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x457e80]
mov dword [ebp - 4], eax
mov dword [ebp - 0x418], 0
mov eax, dword [ebp - 0x418]
mov dword [ebp - 0x428], eax
cmp dword [ebp + 0x10], 0
jne 0x42f9c4
xor eax, eax
jmp 0x42fc67
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
imul edx, edx, 0x24
mov eax, dword [ecx*4 + 0x45b520]
movsx ecx, byte [eax + edx + 4]
and ecx, 0x20
je 0x42f9f6
push 2
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.00439a80
add esp, 0x10
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
movsx eax, byte [edx + ecx + 4]
and eax, 0x80
je 0x42fb6b
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x414], ecx
mov dword [ebp - 0x41c], 0
mov edx, dword [ebp - 0x414]
sub edx, dword [ebp + 0xc]
cmp edx, dword [ebp + 0x10]
jae 0x42fb69
lea eax, [ebp - 0x410]
mov dword [ebp - 0x424], eax
mov ecx, dword [ebp - 0x424]
lea edx, [ebp - 0x410]
sub ecx, edx
cmp ecx, 0x400
jge 0x42fae7
mov eax, dword [ebp - 0x414]
sub eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x42fae7
mov ecx, dword [ebp - 0x414]
mov dl, byte [ecx]
mov byte [ebp - 0x429], dl
mov eax, dword [ebp - 0x414]
add eax, 1
mov dword [ebp - 0x414], eax
movsx ecx, byte [ebp - 0x429]
cmp ecx, 0xa
jne 0x42fac5
mov edx, dword [ebp - 0x428]
add edx, 1
mov dword [ebp - 0x428], edx
mov eax, dword [ebp - 0x424]
mov byte [eax], 0xd
mov ecx, dword [ebp - 0x424]
add ecx, 1
mov dword [ebp - 0x424], ecx
mov edx, dword [ebp - 0x424]
mov al, byte [ebp - 0x429]
mov byte [edx], al
mov ecx, dword [ebp - 0x424]
add ecx, 1
mov dword [ebp - 0x424], ecx
jmp 0x42fa4d
push 0
lea edx, [ebp - 0x420]
push edx
mov eax, dword [ebp - 0x424]
lea ecx, [ebp - 0x410]
sub eax, ecx
push eax
lea edx, [ebp - 0x410]
push edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x42fb56
mov ecx, dword [ebp - 0x418]
add ecx, dword [ebp - 0x420]
mov dword [ebp - 0x418], ecx
mov edx, dword [ebp - 0x424]
lea eax, [ebp - 0x410]
sub edx, eax
cmp dword [ebp - 0x420], edx
jge 0x42fb54
jmp 0x42fb69
jmp 0x42fb64
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
jmp 0x42fb69
jmp 0x42fa2f
jmp 0x42fbc4
push 0
lea ecx, [ebp - 0x420]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
imul edx, edx, 0x24
mov eax, dword [ecx*4 + 0x45b520]
mov ecx, dword [eax + edx]
push ecx
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x42fbb8
mov dword [ebp - 0x41c], 0
mov edx, dword [ebp - 0x420]
mov dword [ebp - 0x418], edx
jmp 0x42fbc4
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x418], 0
jne 0x42fc5b
cmp dword [ebp - 0x41c], 0
je 0x42fc11
cmp dword [ebp - 0x41c], 5
jne 0x42fbfd
call fcn.004380a0
mov dword [eax], 9
call fcn.004380b0
mov ecx, dword [ebp - 0x41c]
mov dword [eax], ecx
jmp 0x42fc0c
mov edx, dword [ebp - 0x41c]
push edx
call fcn.00438000
add esp, 4
or eax, 0xffffffff
jmp 0x42fc67
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, dword [eax*4 + 0x45b520]
movsx eax, byte [edx + ecx + 4]
and eax, 0x40
je 0x42fc40
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
cmp edx, 0x1a
jne 0x42fc40
xor eax, eax
jmp 0x42fc67
call fcn.004380a0
mov dword [eax], 0x1c
call fcn.004380b0
mov dword [eax], 0
or eax, 0xffffffff
jmp 0x42fc67
mov eax, dword [ebp - 0x418]
sub eax, dword [ebp - 0x428]
mov ecx, dword [ebp - 4]
call fcn.0042c800
mov esp, ebp
pop ebp
ret