Function at 0x402a10
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 0xc], 0
push 8
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x402a36
jmp 0x402d06
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword [ecx], eax
mov dword [ecx + 4], eax
push 0x4097b4
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x402aa2
mov eax, dword [ebp + 8]
push eax
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [edx + 0x40973c]
push eax
push 2
call dword [0x400000]
add esp, 4
push eax
call fcn.00401900
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
mov edx, 4
imul eax, edx, 0
mov ecx, dword [eax + 0x40973c]
push ecx
call fcn.00402160
add esp, 8
jmp 0x402d06
push 2
push 0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll_rewind]
add esp, 4
mov edx, dword [ebp - 0x14]
add edx, 1
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x14]
mov byte [eax], 0
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x14]
push edx
push 1
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, dword [ebp - 0x14]
je 0x402b4f
mov ecx, dword [ebp + 8]
push ecx
mov edx, 4
shl edx, 0
mov eax, dword [edx + 0x40973c]
push eax
push 2
call dword [0x400000]
add esp, 4
push eax
call fcn.00401900
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
mov edx, 4
shl edx, 0
mov eax, dword [edx + 0x40973c]
push eax
call fcn.00402160
add esp, 8
jmp 0x402d06
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
push 0
mov edx, dword [ebp - 0x10]
push edx
call fcn.004027f0
add esp, 8
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [eax + 4], 0
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 8], 0
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x14]
cmp dword [ebp - 8], edx
jae 0x402c6c
mov eax, dword [ebp - 8]
movsx ecx, byte [eax]
mov dword [ebp - 0x30], ecx
cmp dword [ebp - 0x30], 0x5b
ja case.0x402ba2.1
mov edx, dword [ebp - 0x30]
movzx eax, byte [edx + 0x402d40]
jmp dword [eax*4 + 0x402d34]
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
jmp 0x402c67
push 0x4097b8
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.MSVCRT.dll_strcspn]
add esp, 8
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
push eax
push 1
mov ecx, dword [ebp - 8]
push ecx
call fcn.004031e0
add esp, 0xc
push eax
mov edx, dword [ebp - 0x10]
push edx
call fcn.004027f0
add esp, 8
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax + 1]
mov dword [ebp - 8], edx
jmp 0x402c67
push 0x4097bc
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.MSVCRT.dll_strcspn]
add esp, 8
mov dword [ebp - 0x34], eax
push 0x4097c0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.MSVCRT.dll_strcspn]
add esp, 8
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x34]
add eax, 1
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.004031e0
add esp, 0xc
push eax
mov edx, dword [ebp - 0x34]
push edx
push 0
mov eax, dword [ebp - 8]
push eax
call fcn.004031e0
add esp, 0xc
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00402770
add esp, 0xc
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
jmp 0x402b7a
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov edx, dword [ebp + 8]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x20]
mov dl, byte [ecx]
mov byte [ebp - 2], dl
add dword [ebp - 0x20], 1
cmp byte [ebp - 2], 0
jne 0x402c95
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
add ecx, 1
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov edx, dword [ebp - 0x10]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx]
mov byte [ebp - 1], dl
mov eax, dword [ebp - 0x28]
mov cl, byte [ebp - 1]
mov byte [eax], cl
mov edx, dword [ebp - 0x2c]
add edx, 1
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
cmp byte [ebp - 1], 0
jne 0x402cd9
mov eax, dword [ebp - 0x10]
jmp 0x402d2d
cmp dword [ebp - 0xc], 0
je 0x402d19
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
cmp dword [ebp - 0x10], 0
je 0x402d2b
mov edx, dword [ebp - 0x10]
push edx
call fcn.004028b0
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret