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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push esi
push edi
push 0x43b5d8
call fcn.00412d9f
add esp, 4
mov dword [ebp - 4], 0
push 0x43e5a4
push 0x43e570
call fcn.004111ff
mov esi, eax
push esi
push 1
push 0x40
push 0x447c00
call fcn.00417ea5
add esp, 0x18
cmp eax, 1
jne 0x401d9e
inc dword [ebp - 4]
push esi
push 1
push 0x40
push 0x447c00
call fcn.00417ea5
add esp, 0x10
cmp eax, 1
je 0x401d84
push dword [ebp - 4]
push 0x43e5a8
call fcn.004010f0
push 0x43e5b8
call fcn.004010f0
add esp, 0xc
push 0x43e5d0
call fcn.004010f0
add esp, 4
push 0x43e618
call fcn.004010f0
add esp, 4
push 0x43e630
call fcn.004010f0
add esp, 4
push 0x43e644
call fcn.004010f0
add esp, 4
push 0x43e65c
call fcn.004010f0
add esp, 4
push 0x43e5d0
call fcn.004010f0
add esp, 4
push 0x43e678
call fcn.004010f0
add esp, 4
lea eax, [ebp - 4]
push eax
push 0x43e4ac
call fcn.00401130
mov eax, dword [ebp - 4]
add esp, 8
dec eax
mov edi, 1
cmp eax, 3
ja case.0x401e36.4
jmp dword [eax*4 + 0x40232c]
push 0x43b5d8
call fcn.00412d9f
add esp, 4
push esi
call fcn.00412daa
add esp, 4
push 0x43e68c
call fcn.004010f0
add esp, 4
push 0x43e6a0
call fcn.004010f0
add esp, 4
push 0x43e6a8
call fcn.004010f0
add esp, 4
push 0x43e6c0
call fcn.004010f0
add esp, 4
push 0x43e6e8
call fcn.004010f0
add esp, 4
push esi
push 1
push 0x40
push 0x447c00
call fcn.00417ea5
add esp, 0x10
cmp eax, 1
jne 0x401f08
nop dword [eax + eax]
push 0x447c00
push edi
push 0x43e728
call fcn.004010f0
mov ecx, dword [0x447c34]
add esp, 0xc
mov eax, 0x7da
sub eax, ecx
push ecx
push dword [0x447c38]
push dword [0x447c3c]
push eax
movsx eax, byte [0x447c32]
push eax
push 0x43e730
call fcn.004010f0
push esi
push 1
push 0x40
push 0x447c00
inc edi
call fcn.00417ea5
add esp, 0x28
cmp eax, 1
je 0x401eb0
push 0x43e744
call fcn.004010f0
add esp, 4
call fcn.0041bf9b
push esi
call fcn.00411742
add esp, 4
call fcn.00401d40
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0x43b5d8
call fcn.00412d9f
add esp, 4
mov edi, 9
push 0x43e768
call fcn.004010f0
add esp, 4
push 0x43e7ac
call fcn.004010f0
add esp, 4
push 0
call fcn.004112de
add esp, 4
push eax
call fcn.00411678
add esp, 4
push 0x43e7b4
call fcn.004010f0
add esp, 4
push 0x43e7d0
call fcn.004010f0
add esp, 4
push 0x43e6a0
call fcn.004010f0
add esp, 4
push 0x43e6a8
call fcn.004010f0
add esp, 4
push esi
call fcn.00412daa
add esp, 4
push esi
push 1
push 0x40
push 0x447c00
call fcn.00417ea5
add esp, 0x10
cmp eax, 1
jne 0x402069
mov ecx, 0x447c00
lea eax, [ebp - 0x38]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401ff0
test dl, dl
je 0x401fec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401ff0
add eax, 2
add ecx, 2
test dl, dl
jne 0x401fd0
xor eax, eax
jmp 0x401ff5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402049
push 0x447c00
lea eax, [edi - 8]
push eax
push 0x43e728
call fcn.004010f0
mov ecx, dword [0x447c34]
add esp, 0xc
mov eax, 0x7da
sub eax, ecx
push ecx
push dword [0x447c38]
push dword [0x447c3c]
push eax
movsx eax, byte [0x447c32]
push eax
call fcn.00411122
add esp, 4
push eax
push 0x43e730
call fcn.004010f0
add esp, 0x18
inc edi
push esi
push 1
push 0x40
push 0x447c00
call fcn.00417ea5
add esp, 0x10
cmp eax, 1
je 0x401fc5
cmp edi, 9
jne 0x402076
push 0x43e814
call fcn.004010f0
add esp, 4
push 0x43e83c
call fcn.004010f0
add esp, 4
call fcn.0041bf9b
push esi
call fcn.00411742
add esp, 4
call fcn.00401d40
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0x43b5d8
call fcn.00412d9f
add esp, 4
push esi
call fcn.00412daa
add esp, 4
push esi
call fcn.00411742
add esp, 4
push 0x43e860
push 0x43e570
call fcn.004111ff
push 0x43e864
push 0x43e598
mov esi, eax
call fcn.004111ff
push 0x43e68c
mov edi, eax
call fcn.004010f0
add esp, 0x14
push 0x43e7d0
call fcn.004010f0
add esp, 4
push 0x43e868
call fcn.004010f0
add esp, 4
push 0x43e7ac
call fcn.004010f0
add esp, 4
push 0
call fcn.004112de
add esp, 4
push eax
call fcn.00411678
add esp, 4
push esi
push 1
push 0x40
push 0x447c00
call fcn.00417ea5
add esp, 0x10
cmp eax, 1
jne 0x40219a
nop dword [eax + eax]
lea ecx, [ebp - 0x38]
mov eax, 0x447c00
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402168
test dl, dl
je 0x402164
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402168
add eax, 2
add ecx, 2
test dl, dl
jne 0x402148
xor eax, eax
jmp 0x40216d
sbb eax, eax
or eax, 1
test eax, eax
je 0x402183
push edi
push 1
push 0x40
push 0x447c00
call fcn.0041307d
add esp, 0x10
push esi
push 1
push 0x40
push 0x447c00
call fcn.00417ea5
add esp, 0x10
cmp eax, 1
je 0x402140
push edi
call fcn.00411742
add esp, 4
push esi
call fcn.00411742
add esp, 4
push 0x43e570
call fcn.00411917
add esp, 4
push 0x43e57c
call fcn.00412d9f
add esp, 4
push 0x43e598
call fcn.00411917
add esp, 4
push 0x43e88c
call fcn.004010f0
add esp, 4
push 0x43e8c0
call fcn.004010f0
add esp, 4
push 0x43e8c0
call fcn.004010f0
add esp, 4
push 0x43e8c0
call fcn.004010f0
add esp, 4
push 0x43e8c8
call fcn.004010f0
add esp, 4
call fcn.0041c10c
push eax
call fcn.00411122
add esp, 4
cmp al, 0x59
jne 0x40231f
push 0x43e5a4
push 0x43e570
mov esi, 1
call fcn.004111ff
push 0x43b5d8
mov edi, eax
call fcn.00412d9f
add esp, 0xc
push 0x43e68c
call fcn.004010f0
add esp, 4
push 0x43e6a0
call fcn.004010f0
add esp, 4
push 0x43e6a8
call fcn.004010f0
add esp, 4
push 0x43e6c0
call fcn.004010f0
add esp, 4
push 0x43e6e8
call fcn.004010f0
add esp, 4
push edi
push esi
push 0x40
push 0x447c00
call fcn.00417ea5
add esp, 0x10
cmp eax, esi
jne 0x402304
push 0x447c00
push esi
push 0x43e728
call fcn.004010f0
mov ecx, dword [0x447c34]
add esp, 0xc
mov eax, 0x7da
sub eax, ecx
push ecx
push dword [0x447c38]
push dword [0x447c3c]
push eax
movsx eax, byte [0x447c32]
push eax
call fcn.00411122
add esp, 4
push eax
push 0x43e730
call fcn.004010f0
push edi
push 1
push 0x40
push 0x447c00
inc esi
call fcn.00417ea5
add esp, 0x28
cmp eax, 1
je 0x4022a3
push 0x43e744
call fcn.004010f0
add esp, 4
call fcn.0041bf9b
push edi
call fcn.00411742
add esp, 4
call fcn.00401d40
pop edi
pop esi
mov esp, ebp
pop ebp
ret