Function at 0x40ccc0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x19c
mov al, byte [0x415e14]
push ebx
push ebp
push esi
push edi
mov byte [esp + 0x80], al
mov ecx, 0x4a
xor eax, eax
lea edi, [esp + 0x81]
mov edx, dword [0x413bf4]
rep stosd dword es:[edi], eax
mov ecx, dword [0x413bf0]
mov ebp, dword [esp + 0x1b0]
mov dword [esp + 0x10], ecx
mov ecx, dword [0x413bec]
stosw word es:[edi], ax
mov ebx, dword [sym.imp.MSVCRT.dll__lseek]
mov dword [esp + 0x1f], ecx
xor ecx, ecx
mov dword [esp + 0x15], edx
mov edx, dword [0x413be8]
mov word [esp + 0x2b], cx
stosb byte es:[edi], al
mov eax, dword [0x413be4]
push ecx
mov dword [esp + 0x1e], eax
mov ax, word [0x415d4c]
push ecx
push ebp
mov byte [esp + 0x20], 0
mov byte [esp + 0x25], 0
mov byte [esp + 0x2a], 0
mov byte [esp + 0x2f], 0
mov dword [esp + 0x30], edx
mov byte [esp + 0x34], 0
mov word [esp + 0x35], ax
mov byte [esp + 0x39], cl
call ebx
add esp, 0xc
cmp eax, 0xffffffff
je 0x40cf44
lea edx, [esp + 0x30]
push 0x1e
push edx
push ebp
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
cmp eax, 0x1e
jne 0x40cf44
cmp byte [esp + 0x30], 0x50
jne 0x40cf44
cmp byte [esp + 0x31], 0x4b
jne 0x40cf44
mov ecx, 7
lea esi, [esp + 0x30]
mov edi, 0x4181c8
mov al, byte [esp + 0x36]
rep movsd dword es:[edi], dword [esi]
test al, 1
movsw word es:[edi], word [esi]
je 0x40cf44
mov eax, dword [esp + 0x46]
cmp eax, 0xa800
jb 0x40cf44
cmp eax, 0xbc00
ja 0x40cf44
test byte [esp + 0x38], 6
jne 0x40cf44
cmp word [esp + 0x4a], 0x12c
jae 0x40ce91
push 0
push 0x1e
push ebp
call ebx
add esp, 0xc
cmp eax, 0xffffffff
je 0x40cf44
mov ecx, 0x4b
xor eax, eax
lea edi, [esp + 0x80]
rep stosd dword es:[edi], eax
mov ax, word [0x4181e2]
lea ecx, [esp + 0x80]
push eax
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll__read]
xor edx, edx
add esp, 0xc
mov dx, word [0x4181e2]
cmp eax, edx
jne 0x40cf44
lea eax, [esp + 0x80]
push 0x2e
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40ce8b
mov al, byte [esp + 0x10]
inc ebx
xor edi, edi
test al, al
je 0x40ce7c
lea eax, [esp + 0x10]
lea esi, [esp + 0x10]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x40ce7c
mov cl, byte [esi + 5]
add esi, 5
inc edi
mov eax, esi
test cl, cl
jne 0x40ce60
lea ecx, [esp + edi + 0x10]
lea edx, [ecx + edi*4]
test edx, edx
je 0x40cf44
mov ebx, dword [sym.imp.MSVCRT.dll__lseek]
mov eax, dword [0x4181e4]
mov edx, dword [0x4181da]
and eax, 0xffff
xor ecx, ecx
mov cx, word [0x4181e2]
add edx, eax
push 0
lea esi, [ecx + edx + 0x1e]
push esi
push ebp
call ebx
add esp, 0xc
cmp eax, 0xffffffff
je 0x40cf34
mov edi, dword [sym.imp.MSVCRT.dll__read]
push 0x2e
push 0x418198
push ebp
call edi
add esp, 0xc
cmp eax, 0x2e
jb 0x40cf34
mov eax, dword [0x4181b8]
mov edx, dword [0x4181b4]
xor ecx, ecx
and eax, 0xffff
mov cx, word [0x4181b6]
and edx, 0xffff
add ecx, esi
push 0
add ecx, eax
lea eax, [edx + ecx + 0x2e]
push eax
push ebp
call ebx
add esp, 0xc
cmp eax, 0xffffffff
je 0x40cf44
push 0x16
push 0x418180
push ebp
call edi
add esp, 0xc
cmp eax, 0x16
jne 0x40cf44
mov eax, 1
cmp word [0x418188], ax
jne 0x40cf44
cmp word [0x41818a], ax
jne 0x40cf44
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x19c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x19c
ret