Function at 0x1027885
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x1030118]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x10], edi
cmp eax, edi
je 0x1027b17
cmp byte [eax], 0
je 0x1027b17
push 0x1005370
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x1027b17
mov eax, dword [ebx + 0x5344]
cmp eax, 0xffffffff
je 0x1027b17
push eax
call fcn.010252a3
cmp edx, edi
mov esi, eax
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], edx
jg 0x1027906
jl 0x10278fe
cmp esi, 0x16
jae 0x1027906
push 0xb
pop eax
jmp 0x1027b06
cmp edx, edi
mov eax, 0x1002b
jg 0x102791d
jl 0x1027915
cmp esi, eax
jae 0x102791d
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], edx
jmp 0x1027923
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], edi
sub esi, dword [ebp - 0x24]
mov edi, edx
sbb edi, dword [ebp - 0x20]
push 0
push edi
push esi
push dword [ebx + 0x5344]
call fcn.01025228
cmp eax, esi
jne 0x1027980
cmp edx, edi
jne 0x1027980
mov esi, dword [ebp - 0x24]
push esi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x1027989
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x1027989
push 0
lea ecx, [ebp - 8]
push ecx
push esi
push eax
push dword [ebx + 0x5344]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1027980
cmp dword [ebp - 8], esi
je 0x1027990
mov dword [ebp - 0x10], 0xb
jmp 0x1027990
mov dword [ebp - 0x10], 4
push 0x16
xor eax, eax
pop ecx
mov dword [ebp - 0x1c], 0x12
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x38], ecx
jne 0x10279af
cmp dword [ebp - 0x34], eax
jne 0x10279af
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x24]
sub ecx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
sbb esi, dword [ebp - 0x18]
mov dword [ebp - 0x34], 3
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x10], 0
jne 0x1027ac3
test esi, esi
jl 0x1027ae5
jg 0x10279e1
test ecx, ecx
jb 0x1027ae5
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x18], eax
jg 0x1027ae5
jl 0x10279fb
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x1c], eax
ja 0x1027ae5
mov edi, dword [ebp - 0x28]
mov al, byte [ecx + edi]
mov byte [ebp - 0x11], al
mov eax, ecx
add eax, 1
mov bl, byte [eax + edi]
mov edx, esi
adc edx, 0
add eax, 1
push 0x12
pop edi
adc edx, 0
sub edi, dword [ebp - 0x34]
jmp 0x1027a74
mov ebx, dword [ebp - 0x28]
mov bl, byte [eax + ebx]
add eax, 1
adc edx, 0
cmp byte [ebp - 0x11], 0x50
mov byte [ebp - 0x12], bl
jne 0x1027a6a
cmp byte [ebp - 9], 0x4b
jne 0x1027a6a
cmp bl, 5
jne 0x1027a6a
mov ebx, dword [ebp - 0x28]
cmp byte [eax + ebx], 6
jne 0x1027a6a
cmp byte [eax + ebx + 1], 0
jne 0x1027a63
cmp byte [eax + ebx + 2], 0
jne 0x1027a63
and dword [ebp - 0x10], 0
mov dword [ebp - 0x30], 1
jmp 0x1027a6a
mov dword [ebp - 0x10], 0x15
mov bl, byte [ebp - 9]
mov byte [ebp - 0x11], bl
mov bl, byte [ebp - 0x12]
dec edi
mov byte [ebp - 9], bl
test edi, edi
jg 0x1027a1f
xor eax, eax
cmp dword [ebp - 0x30], eax
jne 0x1027a93
cmp esi, eax
jg 0x1027a93
jl 0x1027a8c
cmp ecx, eax
ja 0x1027a93
mov dword [ebp - 0x10], 0xb
add dword [ebp - 0x1c], 0x12
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
adc dword [ebp - 0x18], eax
sub ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x34], eax
sbb esi, dword [ebp - 0x18]
cmp esi, eax
jg 0x1027ab7
jl 0x1027ab3
cmp ecx, eax
jae 0x1027ab7
xor ecx, ecx
xor esi, esi
mov ebx, dword [ebp - 0x3c]
cmp dword [ebp - 0x30], eax
je 0x10279c5
cmp dword [ebp - 0x10], 0xb
jne 0x1027ae5
push ebx
push dword [ebp - 0x40]
push 0
call fcn.0102c423
push eax
call fcn.0102c0f1
test eax, eax
je 0x1027ae5
mov dword [ebp - 0x10], 0x15
xor edi, edi
cmp dword [ebp - 0x28], edi
je 0x1027af5
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [ebp - 0x2c], edi
je 0x1027b03
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0101bc5d
leave
ret 8
mov dword [ebp - 0x10], edi
jmp 0x1027ae7