Function at 0x41f3a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x42e16c]
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 0x41f3d4
xor eax, eax
jmp 0x41f677
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 + 0x430800]
movsx ecx, byte [eax + edx + 4]
and ecx, 0x20
je 0x41f406
push 2
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.00422260
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 + 0x430800]
movsx eax, byte [edx + ecx + 4]
and eax, 0x80
je 0x41f57b
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 0x41f579
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 0x41f4f7
mov eax, dword [ebp - 0x414]
sub eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x41f4f7
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 0x41f4d5
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 0x41f45d
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 + 0x430800]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41f566
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 0x41f564
jmp 0x41f579
jmp 0x41f574
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
jmp 0x41f579
jmp 0x41f43f
jmp 0x41f5d4
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 + 0x430800]
mov ecx, dword [eax + edx]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41f5c8
mov dword [ebp - 0x41c], 0
mov edx, dword [ebp - 0x420]
mov dword [ebp - 0x418], edx
jmp 0x41f5d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x418], 0
jne 0x41f66b
cmp dword [ebp - 0x41c], 0
je 0x41f621
cmp dword [ebp - 0x41c], 5
jne 0x41f60d
call fcn.0040f610
mov dword [eax], 9
call fcn.0040f620
mov ecx, dword [ebp - 0x41c]
mov dword [eax], ecx
jmp 0x41f61c
mov edx, dword [ebp - 0x41c]
push edx
call fcn.0040f570
add esp, 4
or eax, 0xffffffff
jmp 0x41f677
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 + 0x430800]
movsx eax, byte [edx + ecx + 4]
and eax, 0x40
je 0x41f650
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
cmp edx, 0x1a
jne 0x41f650
xor eax, eax
jmp 0x41f677
call fcn.0040f610
mov dword [eax], 0x1c
call fcn.0040f620
mov dword [eax], 0
or eax, 0xffffffff
jmp 0x41f677
mov eax, dword [ebp - 0x418]
sub eax, dword [ebp - 0x428]
mov ecx, dword [ebp - 4]
call fcn.0040dcd0
mov esp, ebp
pop ebp
ret