Function at 0x40279e
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
push esi
push edi
mov dword [eax], ebx
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
mov eax, dword [ebp + 0x18]
mov dword [eax], ebx
mov esi, 0x4061d4
lea edi, [ebp - 0x20]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
lea edi, [ebp - 0x1a]
stosw word es:[edi], ax
mov esi, 0x4061cc
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push ebx
movsb byte es:[edi], byte [esi]
push ebx
push 0x3c
push dword [ebp + 8]
lea edi, [ebp - 0x11]
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov dword [ebp - 8], ebx
call edi
cmp eax, 0xffffffff
je 0x4029a6
mov esi, dword [sym.imp.KERNEL32.DLL_ReadFile]
push ebx
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x4029a6
cmp dword [ebp - 4], 4
jne 0x4029a6
mov eax, dword [ebp - 0x10]
push ebx
add eax, 4
push ebx
push eax
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
call edi
cmp eax, 0xffffffff
je 0x4029a6
push ebx
lea eax, [ebp - 4]
push eax
push 0x14
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x4029a6
cmp dword [ebp - 4], 0x14
jne 0x4029a6
cmp word [ebp - 0x32], bx
je 0x4029a6
mov eax, 0x14c
cmp word [ebp - 0x34], ax
jne 0x4029a6
push ebx
lea eax, [ebp - 4]
push eax
mov edi, 0xe0
push edi
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x4029a6
cmp dword [ebp - 4], edi
jne 0x4029a6
lea eax, [edi + 0x2b]
cmp word [ebp - 0x114], ax
jne 0x4029a6
movzx edi, word [ebp - 0x32]
mov eax, dword [ebp - 0xf8]
imul edi, edi, 0x28
mov ecx, dword [ebp + 0x18]
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov dword [ecx], eax
cmp edi, ebx
je 0x4028e2
lea eax, [edi + 1]
push eax
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov dword [ebp + 0x18], eax
jmp 0x4028e5
mov dword [ebp + 0x18], ebx
cmp dword [ebp + 0x18], ebx
je 0x4029a6
movzx eax, word [ebp - 0x24]
mov ecx, dword [ebp - 0xc]
push ebx
push ebx
lea eax, [ecx + eax + 0x14]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
je 0x402988
push ebx
lea eax, [ebp - 4]
push eax
push edi
push dword [ebp + 0x18]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x402988
cmp dword [ebp - 4], edi
jne 0x402988
movzx ecx, word [ebp - 0x32]
cmp ecx, ebx
jbe 0x402988
mov eax, dword [ebp + 0x18]
add eax, 0x14
mov dword [ebp - 0xc], ecx
push 2
lea esi, [eax - 0x14]
pop ecx
lea edi, [ebp - 0x20]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x40294f
mov ecx, dword [eax - 8]
sub ecx, dword [eax]
mov edx, dword [ebp + 0xc]
jmp 0x402971
test byte [ebp - 0x22], 1
jne 0x40297a
push 2
pop ecx
lea edi, [ebp - 0x18]
lea esi, [eax - 0x14]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x40297a
mov ecx, dword [eax]
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
mov ecx, dword [eax - 4]
mov edx, dword [ebp + 0x14]
mov dword [ebp - 8], 1
mov dword [edx], ecx
add eax, 0x28
dec dword [ebp - 0xc]
jne 0x402936
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push dword [ebp + 0x18]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.DLL_HeapValidate]
test eax, eax
je 0x4029a6
push dword [ebp + 0x18]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
push ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4029ba
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret