Function at 0x40bd10
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40df6e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc40
push ebp
push edi
mov al, byte [0x414978]
mov ecx, 0xff
mov byte [esp + 0x48], al
xor eax, eax
lea edi, [esp + 0x49]
mov dword [esp + 0xc50], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0xc]
stosb byte es:[edi], al
call sub.MFC42.DLL_CString::CString_2
mov byte [esp + 0xc50], 1
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
lea ecx, [esp + 0xc58]
mov dword [esp + 0x44], eax
push ecx
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator_1
mov edx, dword [esp + 0xc]
push 0x20
push 0x41494c
push edx
call dword [sym.imp.MSVCRT.dll__fsopen]
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x40c01b
push ebx
push esi
push 0
push 0xc
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov bl, 0x65
mov esi, dword [sym.imp.MSVCRT.dll_fread]
push ebp
push 0x10
lea eax, [esp + 0x28]
push 1
push eax
call esi
add esp, 0x10
cmp eax, 0x10
jne 0x40c00d
cmp byte [esp + 0x20], 0x6e
jne 0x40bdae
cmp byte [esp + 0x21], 0x61
jne 0x40bdae
cmp byte [esp + 0x22], 0x6d
jne 0x40bdae
cmp byte [esp + 0x23], bl
jne 0x40bdae
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x29]
mov edx, dword [esp + 0x2a]
and edi, 0xff
mov eax, dword [esp + 0x2b]
and ecx, 0xff
shl edi, 8
add edi, ecx
and edx, 0xff
shl edi, 8
add edi, edx
and eax, 0xff
shl edi, 8
add edi, eax
push 0
push edi
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
push ebp
push 6
lea ecx, [esp + 0x34]
push 1
push ecx
call esi
movzx ax, byte [esp + 0x3e]
movzx bx, byte [esp + 0x40]
movzx dx, byte [esp + 0x3f]
movzx cx, byte [esp + 0x41]
shl eax, 8
shl ebx, 8
add eax, edx
add esp, 0x1c
add ebx, ecx
and eax, 0xffff
mov dword [esp + 0x48], ebx
mov dword [esp + 0x40], 0
mov dword [esp + 0x1c], eax
jle 0x40c00d
lea edx, [edi + 6]
mov dword [esp + 0x18], edx
jmp 0x40be82
mov esi, dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x18]
push 0
push eax
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
push ebp
push 0xc
lea ecx, [esp + 0x34]
push 1
push ecx
call esi
add esp, 0x1c
cmp eax, 0xc
jne 0x40c00d
movzx ax, byte [esp + 0x20]
movzx dx, byte [esp + 0x21]
movzx cx, byte [esp + 0x25]
shl eax, 8
add eax, edx
mov dword [esp + 0x44], eax
movzx ax, byte [esp + 0x24]
shl eax, 8
add eax, ecx
cmp ax, word [esp + 0x4c]
je 0x40bee3
and eax, 0x3ff
cmp eax, 9
jne 0x40bfed
movzx ax, byte [esp + 0x26]
movzx dx, byte [esp + 0x27]
shl eax, 8
add eax, edx
cmp ax, 4
jne 0x40bfed
movzx si, byte [esp + 0x28]
movzx ax, byte [esp + 0x29]
shl esi, 8
add esi, eax
cmp si, 0x400
mov dword [esp + 0x10], esi
jb 0x40bf23
mov esi, 0x3ff
mov dword [esp + 0x10], esi
movzx ax, byte [esp + 0x2a]
movzx cx, byte [esp + 0x2b]
shl eax, 8
add eax, ecx
mov edx, ebx
and eax, 0xffff
mov ecx, edi
and edx, 0xffff
add ecx, eax
add edx, ecx
push 0
push edx
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
and esi, 0xffff
push ebp
push esi
lea edx, [esp + 0x64]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x1c
cmp eax, esi
jne 0x40c00d
cmp word [esp + 0x44], 3
mov byte [esp + esi + 0x50], 0
jne 0x40bfdc
shr word [esp + 0x10], 1
mov edx, dword [esp + 0x10]
xor ebx, ebx
and edx, 0xffff
lea eax, [esp + 0x50]
jle 0x40bfb8
lea ecx, [esp + 0x450]
mov esi, edx
mov ebx, edx
xor edx, edx
add ecx, 2
mov dh, byte [eax]
inc eax
mov word [ecx - 2], dx
movzx dx, byte [eax]
add word [ecx - 2], dx
inc eax
dec esi
jne 0x40bfa0
mov ecx, dword [esp + 0xc64]
lea eax, [esp + 0x450]
push eax
mov word [esp + ebx*2 + 0x454], 0
call sub.MFC42.DLL_CString::operator
mov ebx, dword [esp + 0x48]
jmp 0x40bfed
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esp + 0xc68]
call sub.MFC42.DLL_CString::operator_2
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
inc eax
add edx, 0xc
cmp eax, ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x18], edx
jl 0x40be7c
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop esi
pop ebx
jmp 0x40c060
mov edx, dword [esp + 0xc58]
lea ecx, [esp + 0xc58]
mov eax, dword [edx - 8]
add eax, 0xfffffffc
push eax
lea eax, [esp + 0x18]
push eax
call sub.MFC42.DLL_CString::Left
mov ecx, dword [esp + 0xc5c]
push eax
mov byte [esp + 0xc54], 2
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x14]
mov byte [esp + 0xc50], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
mov byte [esp + 0xc50], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc58]
mov dword [esp + 0xc50], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0xc48]
pop edi
pop ebp
mov dword fs:[0], ecx
add esp, 0xc4c
ret 8