Function at 0x4038fa
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x30040
call fcn.00406360
push ebx
push esi
lea eax, [ebp - 0x30040]
push edi
push eax
lea ebx, [ebp - 0x30040]
push dword [ebp + 8]
call fcn.00403b81
pop ecx
cmp eax, 0xffffffff
pop ecx
je 0x403b79
movzx ecx, byte [ebp - 0x3002d]
movzx edx, byte [ebp - 0x3002e]
shl ecx, 8
or ecx, edx
push 0
movzx edx, byte [ebp - 0x3002f]
shl ecx, 8
or ecx, edx
movzx edx, byte [ebp - 0x30030]
movzx esi, byte [ebp - 0x30032]
shl ecx, 8
or ecx, edx
movzx edx, byte [ebp - 0x30031]
shl edx, 8
or edx, esi
movzx esi, byte [ebp - 0x30033]
shl edx, 8
or edx, esi
movzx esi, byte [ebp - 0x30034]
shl edx, 8
or edx, esi
add edx, ecx
sub eax, edx
add ecx, eax
mov dword [ebp - 0xc], eax
push ecx
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__lseek]
add esp, 0xc
test eax, eax
jl 0x403b79
mov edi, 0x400
lea eax, [ebp - 0x30040]
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__read]
mov esi, eax
add esp, 0xc
test esi, esi
mov dword [ebp - 4], esi
jl 0x403b79
movzx eax, byte [ebp - 0x3003d]
movzx ecx, byte [ebp - 0x3003e]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp - 0x3003f]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp - 0x30040]
shl eax, 8
or eax, ecx
cmp eax, 0x2014b50
jne 0x403b79
cmp esi, 0x2e
jge 0x403a34
push esi
lea eax, [ebp - 0x30040]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
mov ebx, eax
lea eax, [ebp + esi - 0x30040]
push edi
push eax
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0x18
test eax, eax
jle 0x403b79
add esi, eax
mov dword [ebp - 4], esi
xor eax, eax
xor ecx, ecx
mov ah, byte [ebx + 0x21]
mov ch, byte [ebx + 0x1f]
mov al, byte [ebx + 0x20]
mov cl, byte [ebx + 0x1e]
add eax, ecx
xor ecx, ecx
mov ch, byte [ebx + 0x1d]
mov cl, byte [ebx + 0x1c]
lea eax, [eax + ecx + 0x2e]
mov dword [ebp - 8], eax
add eax, 4
cmp esi, eax
jge 0x403aaa
lea eax, [ebp - 0x30040]
cmp ebx, eax
je 0x403a7a
push esi
lea eax, [ebp - 0x30040]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
mov ebx, eax
mov eax, dword [ebp - 8]
sub eax, esi
add eax, 4
cmp eax, edi
jge 0x403a88
mov eax, edi
push eax
lea eax, [ebp + esi - 0x30040]
push eax
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
test eax, eax
jle 0x403b79
add esi, eax
mov dword [ebp - 4], esi
mov ecx, dword [0x40710c]
xor eax, eax
mov ah, byte [ebx + 0x1d]
mov al, byte [ebx + 0x1c]
cmp eax, ecx
jne 0x403ad3
mov edi, dword [0x409760]
lea esi, [ebx + 0x2e]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x403af8
mov esi, dword [ebp - 4]
mov edi, 0x400
add ebx, dword [ebp - 8]
sub esi, dword [ebp - 8]
xor eax, eax
mov dword [ebp - 4], esi
mov ah, byte [ebx + 3]
mov al, byte [ebx + 2]
movzx ecx, byte [ebx + 1]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebx]
shl eax, 8
jmp 0x4039ef
movzx ecx, byte [ebx + 0x19]
xor eax, eax
mov esi, dword [ebp + 0xc]
mov ah, byte [ebx + 0x1b]
xor edx, edx
mov al, byte [ebx + 0x1a]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebx + 0x18]
shl eax, 8
or eax, ecx
mov dword [esi], eax
xor eax, eax
mov ah, byte [ebx + 0x17]
mov al, byte [ebx + 0x16]
movzx ecx, byte [ebx + 0x15]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebx + 0x14]
shl eax, 8
or eax, ecx
mov dword [esi + 4], eax
xor eax, eax
mov ah, byte [ebx + 0x2d]
mov dh, byte [ebx + 0x1d]
mov al, byte [ebx + 0x2c]
mov dl, byte [ebx + 0x1c]
movzx ecx, byte [ebx + 0x2b]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebx + 0x2a]
shl eax, 8
or eax, ecx
xor ecx, ecx
mov ch, byte [ebx + 0x1f]
add eax, dword [ebp - 0xc]
mov cl, byte [ebx + 0x1e]
add eax, ecx
lea eax, [edx + eax + 0x1e]
mov dword [esi + 8], eax
xor eax, eax
mov ah, byte [ebx + 0xb]
mov al, byte [ebx + 0xa]
mov dword [esi + 0xc], eax
xor eax, eax
jmp 0x403b7c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret