Function at 0x40a2c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x42c
mov eax, dword [0x42d270]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, dword [0x48f9c0]
jae 0x40a2f9
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0x48f9e0]
movsx ecx, byte [eax + edx*8 + 4]
and ecx, 1
jne 0x40a315
mov dword [0x48f374], 9
mov dword [0x48f378], 0
or eax, 0xffffffff
jmp 0x40a5c8
mov dword [ebp - 0x418], 0
mov edx, dword [ebp - 0x418]
mov dword [ebp - 0x428], edx
cmp dword [ebp + 0x10], 0
jne 0x40a338
xor eax, eax
jmp 0x40a5c8
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
mov edx, dword [eax*4 + 0x48f9e0]
movsx eax, byte [edx + ecx*8 + 4]
and eax, 0x20
je 0x40a367
push 2
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.00411a10
add esp, 0x10
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x48f9e0]
movsx edx, byte [ecx + eax*8 + 4]
and edx, 0x80
je 0x40a4d6
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x414], eax
mov dword [ebp - 0x41c], 0
mov ecx, dword [ebp - 0x414]
sub ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp + 0x10]
jae 0x40a4d4
lea edx, [ebp - 0x410]
mov dword [ebp - 0x424], edx
mov eax, dword [ebp - 0x424]
lea ecx, [ebp - 0x410]
sub eax, ecx
cmp eax, 0x400
jge 0x40a455
mov edx, dword [ebp - 0x414]
sub edx, dword [ebp + 0xc]
cmp edx, dword [ebp + 0x10]
jae 0x40a455
mov eax, dword [ebp - 0x414]
mov cl, byte [eax]
mov byte [ebp - 0x429], cl
mov edx, dword [ebp - 0x414]
add edx, 1
mov dword [ebp - 0x414], edx
movsx eax, byte [ebp - 0x429]
cmp eax, 0xa
jne 0x40a433
mov ecx, dword [ebp - 0x428]
add ecx, 1
mov dword [ebp - 0x428], ecx
mov edx, dword [ebp - 0x424]
mov byte [edx], 0xd
mov eax, dword [ebp - 0x424]
add eax, 1
mov dword [ebp - 0x424], eax
mov ecx, dword [ebp - 0x424]
mov dl, byte [ebp - 0x429]
mov byte [ecx], dl
mov eax, dword [ebp - 0x424]
add eax, 1
mov dword [ebp - 0x424], eax
jmp 0x40a3bc
push 0
lea ecx, [ebp - 0x420]
push ecx
mov edx, dword [ebp - 0x424]
lea eax, [ebp - 0x410]
sub edx, eax
push edx
lea ecx, [ebp - 0x410]
push ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x48f9e0]
mov edx, dword [ecx + eax*8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a4c1
mov eax, dword [ebp - 0x418]
add eax, dword [ebp - 0x420]
mov dword [ebp - 0x418], eax
mov ecx, dword [ebp - 0x424]
lea edx, [ebp - 0x410]
sub ecx, edx
cmp dword [ebp - 0x420], ecx
jge 0x40a4bf
jmp 0x40a4d4
jmp 0x40a4cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
jmp 0x40a4d4
jmp 0x40a39e
jmp 0x40a52c
push 0
lea eax, [ebp - 0x420]
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 + 0x48f9e0]
mov eax, dword [edx + ecx*8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a520
mov dword [ebp - 0x41c], 0
mov ecx, dword [ebp - 0x420]
mov dword [ebp - 0x418], ecx
jmp 0x40a52c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x418], 0
jne 0x40a5bc
cmp dword [ebp - 0x41c], 0
je 0x40a577
cmp dword [ebp - 0x41c], 5
jne 0x40a563
mov dword [0x48f374], 9
mov edx, dword [ebp - 0x41c]
mov dword [0x48f378], edx
jmp 0x40a572
mov eax, dword [ebp - 0x41c]
push eax
call fcn.00411060
add esp, 4
or eax, 0xffffffff
jmp 0x40a5c8
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
mov eax, dword [ecx*4 + 0x48f9e0]
movsx ecx, byte [eax + edx*8 + 4]
and ecx, 0x40
je 0x40a5a3
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
cmp eax, 0x1a
jne 0x40a5a3
xor eax, eax
jmp 0x40a5c8
mov dword [0x48f374], 0x1c
mov dword [0x48f378], 0
or eax, 0xffffffff
jmp 0x40a5c8
mov eax, dword [ebp - 0x418]
sub eax, dword [ebp - 0x428]
mov ecx, dword [ebp - 4]
call fcn.00411b10
mov esp, ebp
pop ebp
ret