Function at 0x40a400
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47eb8b0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x47fc00c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 1
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 0x10
push 0x47f6fa8
cmovae eax, dword [ebp + 8]
push eax
call fcn.0041c624
add esp, 8
test eax, eax
je 0x40a5e1
push eax
call fcn.0041c6b2
add esp, 4
lea edx, [ebp + 0x20]
lea ecx, [ebp + 8]
call fcn.00417e20
test al, al
jne 0x40a5e1
push 0x10000
call fcn.004190f2
add esp, 4
mov ebx, eax
push 0x10000
push 0
push ebx
call fcn.0041a130
sub esp, 0xc
mov ecx, esp
push 0x47fd57c
call fcn.00417340
lea ecx, [ebp - 0x28]
call fcn.00402b40
add esp, 0x18
cmp dword [eax + 0x14], 0x10
jb 0x40a4aa
mov eax, dword [eax]
cmp dword [ebp + 0x1c], 0x10
lea ecx, [ebp + 8]
push eax
cmovae ecx, dword [ebp + 8]
push ecx
call fcn.0041c624
mov edx, dword [ebp - 0x14]
add esp, 8
mov esi, eax
cmp edx, 0x10
jb 0x40a4f5
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40a4eb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a665
push edx
push ecx
call fcn.004190e4
add esp, 8
sub esp, 0x18
mov dword [ebp - 0x18], 0
mov ecx, esp
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
push 0x47fd21c
call fcn.00417340
lea ecx, [ebp - 0x40]
call fcn.00402b40
add esp, 0x18
cmp dword [eax + 0x14], 0x10
jb 0x40a529
mov eax, dword [eax]
cmp dword [ebp + 0x34], 0x10
lea ecx, [ebp + 0x20]
push eax
cmovae ecx, dword [ebp + 0x20]
push ecx
call fcn.0041c624
mov edx, dword [ebp - 0x2c]
add esp, 8
mov dword [ebp - 0x10], eax
cmp edx, 0x10
jb 0x40a575
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40a56b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a66a
push edx
push ecx
call fcn.004190e4
add esp, 8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
push esi
push 0x200
push 1
push ebx
call fcn.0041da40
mov edi, eax
add esp, 0x10
cmp edi, 1
jge 0x40a5b9
push esi
call fcn.0041c541
add esp, 4
test eax, eax
je 0x40a5b9
push esi
call fcn.0041c515
add esp, 4
test eax, eax
je 0x40a5cd
push dword [ebp - 0x10]
push 1
push edi
push ebx
call fcn.0041d44e
add esp, 0x10
cmp eax, 1
je 0x40a587
push esi
call fcn.0041c6b2
add esp, 4
push dword [ebp - 0x10]
call fcn.0041c6b2
add esp, 4
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x40a611
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40a607
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a66f
push edx
push ecx
call fcn.004190e4
add esp, 8
mov edx, dword [ebp + 0x34]
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 0xf
mov byte [ebp + 8], 0
cmp edx, 0x10
jb 0x40a653
mov ecx, dword [ebp + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40a649
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a66f
push edx
push ecx
call fcn.004190e4
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0041dd37
call fcn.0041dd37
call fcn.0041dd37
int3