Function at 0x4312fa
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x461070]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x48], ebx
cmp esi, 0xffffffff
jne 0x431325
xor eax, eax
jmp 0x4314f5
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push ebx
push ebx
push esi
call edi
push ebx
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x48]
push eax
push 2
lea eax, [ebp - 0x14]
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
call esi
push ebx
lea eax, [ebp - 0x48]
push eax
push 0xc
lea eax, [ebp - 0x12]
push eax
push dword [ebp - 0x44]
call esi
mov eax, 0x4d42
cmp word [ebp - 0x14], ax
je 0x431372
push ebx
push ebx
push dword [ebp - 0x4c]
mov dword [ebp - 0xa], ebx
push dword [ebp - 0x44]
call edi
push ebx
lea eax, [ebp - 0x48]
push eax
push 0x28
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x44]
call esi
test eax, eax
je 0x431451
lea eax, [ebp - 0x3c]
push eax
call fcn.004311eb
mov ecx, dword [ebp - 0x3c]
movzx edx, ax
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x54], ecx
cmp ecx, 0xc
je 0x4313ae
cmp ecx, 0x28
je 0x431401
jmp 0x431451
lea esi, [ebp - 0x3c]
lea edi, [ebp - 0x68]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x64]
movzx ecx, ax
shr eax, 0x10
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x60]
push 1
mov word [ebp - 0x30], ax
shr eax, 0x10
push ebx
mov word [ebp - 0x2e], ax
movzx eax, dx
push 0xffffffffffffffe4
push dword [ebp - 0x44]
mov dword [ebp - 0x3c], 0x28
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], ebx
jne 0x43141e
movzx eax, word [ebp - 0x2e]
imul eax, dword [ebp - 0x38]
add eax, 0x1f
shr eax, 5
imul eax, dword [ebp - 0x34]
shl eax, 2
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x1c], ebx
jne 0x431432
lea eax, [ebp - 0x3c]
push eax
call fcn.004311eb
movzx eax, ax
mov dword [ebp - 0x1c], eax
movzx eax, word [ebp - 0x40]
mov dword [ebp - 0x58], eax
shl eax, 2
mov dword [ebp - 0x5c], eax
add eax, ecx
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x50], eax
cmp eax, ebx
jne 0x431458
xor eax, eax
jmp 0x4314f4
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push 0xa
pop ecx
lea esi, [ebp - 0x3c]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x3c]
lea esi, [eax + ecx]
cmp word [ebp - 0x40], bx
je 0x4314d2
cmp dword [ebp - 0x54], 0xc
push ebx
lea eax, [ebp - 0x48]
push eax
jne 0x4314c5
mov edi, dword [ebp - 0x58]
mov eax, edi
imul eax, eax, 3
push eax
push esi
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_ReadFile]
dec edi
cmp edi, ebx
jl 0x4314d2
mov eax, edi
imul eax, eax, 3
mov byte [ebp - 0x3d], bl
lea eax, [eax + esi + 1]
mov cl, byte [eax + 1]
mov byte [ebp - 0x3e], cl
mov cl, byte [eax - 1]
mov byte [ebp - 0x40], cl
mov cl, byte [eax]
mov byte [ebp - 0x3f], cl
mov ecx, dword [ebp - 0x40]
mov dword [esi + edi*4], ecx
dec edi
sub eax, 3
cmp edi, ebx
jge 0x4314a4
jmp 0x4314d2
push dword [ebp - 0x5c]
push esi
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xa]
cmp eax, ebx
je 0x4314e8
add eax, dword [ebp - 0x4c]
push ebx
push ebx
push eax
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x50]
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004224f9
leave
ret 4