Function at 0x10027fb0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov esi, esi
mov edx, dword [ebp + 0x10]
add esp, 0xffffffe4
push edi
mov edi, dword [ebp + 8]
push 0xfffffffffffffffe
pop eax
cmp edi, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], edx
jne 0x10027fe7
call fcn.1001cf5f
and dword [eax], 0
call fcn.1001cf4c
mov dword [eax], 9
or eax, 0xffffffff
jmp 0x10028564
push ebx
xor ebx, ebx
cmp edi, ebx
jl 0x10027ff6
cmp edi, dword [0x10046a0c]
jb 0x10028015
call fcn.1001cf5f
mov dword [eax], ebx
call fcn.1001cf4c
mov dword [eax], 9
call fcn.1001e899
or eax, 0xffffffff
jmp 0x10028563
mov eax, edi
sar eax, 5
push esi
and edi, 0x1f
lea esi, [eax*4 + 0x10046a20]
shl edi, 6
mov eax, dword [esi]
mov cl, byte [eax + edi + 4]
test cl, 1
jne 0x10028047
call fcn.1001cf5f
mov dword [eax], ebx
call fcn.1001cf4c
mov dword [eax], 9
jmp 0x100280af
cmp edx, 0x7fffffff
ja 0x1002809d
cmp edx, ebx
mov dword [ebp - 0xc], ebx
je 0x10028560
test cl, 2
jne 0x10028560
cmp dword [ebp + 0xc], ebx
je 0x1002809d
mov al, byte [eax + edi + 0x24]
add al, al
sar al, 1
mov byte [ebp - 2], al
push 4
pop ecx
movsx eax, al
dec eax
je 0x10028095
dec eax
jne 0x1002808d
mov eax, edx
not eax
test al, 1
je 0x1002809d
and edx, 0xfffffffe
mov dword [ebp + 0x10], edx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
jmp 0x1002810f
mov eax, edx
not eax
test al, 1
jne 0x100280b6
call fcn.1001cf5f
mov dword [eax], ebx
call fcn.1001cf4c
mov dword [eax], 0x16
call fcn.1001e899
jmp 0x100280ec
mov dword [ebp + 0x10], ecx
mov eax, edx
shr eax, 1
cmp eax, ecx
jb 0x100280c4
mov dword [ebp + 0x10], eax
push dword [ebp + 0x10]
call fcn.100215c7
pop ecx
mov ebx, eax
mov dword [ebp - 0x10], ebx
or ebx, ebx
jne 0x100280f4
call fcn.1001cf4c
mov dword [eax], 0xc
call fcn.1001cf5f
mov dword [eax], 8
or eax, 0xffffffff
jmp 0x10028562
push 1
push 0
push 0
push dword [ebp + 8]
call fcn.10025f12
sub esp, 0xfffffff0
mov ecx, dword [esi]
mov dword [edi + ecx + 0x28], eax
mov dword [edi + ecx + 0x2c], edx
mov eax, ebx
mov ecx, dword [esi]
add ecx, edi
test byte [ecx + 4], 0x48
je 0x10028195
mov cl, byte [ecx + 5]
cmp cl, 0xa
je 0x10028195
cmp dword [ebp + 0x10], 0
je 0x10028195
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 0
lea eax, [ebx + 1]
mov byte [ebx], cl
mov ecx, dword [esi]
mov dword [ebp - 0xc], 1
mov byte [edi + ecx + 5], 0xa
je 0x10028195
mov ecx, dword [esi]
mov cl, byte [edi + ecx + 0x25]
cmp cl, 0xa
je 0x10028195
cmp dword [ebp + 0x10], 0
je 0x10028195
mov byte [eax], cl
mov ecx, dword [esi]
inc eax
dec dword [ebp + 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0xc], 2
mov byte [edi + ecx + 0x25], 0xa
jne 0x10028195
mov ecx, dword [esi]
mov cl, byte [edi + ecx + 0x26]
cmp cl, 0xa
je 0x10028195
cmp dword [ebp + 0x10], 0
je 0x10028195
mov byte [eax], cl
mov ecx, dword [esi]
inc eax
dec dword [ebp + 0x10]
mov dword [ebp - 0xc], 3
mov byte [edi + ecx + 0x26], 0xa
push 0
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push eax
mov eax, dword [esi]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
or eax, eax
je 0x1002852a
mov ecx, dword [ebp - 0x18]
or ecx, ecx
js 0x1002852a
cmp ecx, dword [ebp + 0x10]
ja 0x1002852a
mov eax, dword [esi]
add dword [ebp - 0xc], ecx
lea eax, [edi + eax + 4]
test byte [eax], 0x80
je 0x100283bc
cmp byte [ebp - 2], 2
je 0x100283f6
or ecx, ecx
je 0x100281f0
cmp byte [ebx], 0xa
jne 0x100281f0
or byte [eax], 4
jmp 0x100281f3
and byte [eax], 0xfb
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov dword [ebp + 0x10], ebx
add eax, ebx
mov dword [ebp - 0xc], eax
cmp ebx, eax
jae 0x100282da
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx]
cmp al, 0x1a
je 0x100282c5
cmp al, 0xd
je 0x10028226
mov byte [ebx], al
inc ebx
inc ecx
mov dword [ebp + 0x10], ecx
jmp 0x100282b7
mov eax, dword [ebp - 0xc]
dec eax
cmp ecx, eax
jae 0x10028246
lea eax, [ecx + 1]
cmp byte [eax], 0xa
jne 0x10028241
sub ecx, 0xfffffffe
mov dword [ebp + 0x10], ecx
mov byte [ebx], 0xa
jmp 0x100282b6
mov dword [ebp + 0x10], eax
jmp 0x100282b3
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 1]
push 1
push eax
mov eax, dword [esi]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1002826e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x100282b3
cmp dword [ebp - 0x18], 0
je 0x100282b3
mov eax, dword [esi]
test byte [edi + eax + 4], 0x48
je 0x10028291
cmp byte [ebp - 1], 0xa
je 0x1002823c
mov byte [ebx], 0xd
mov eax, dword [esi]
mov cl, byte [ebp - 1]
mov byte [edi + eax + 5], cl
jmp 0x100282b6
cmp ebx, dword [ebp - 0x10]
jne 0x1002829c
cmp byte [ebp - 1], 0xa
je 0x1002823c
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10025f12
sub esp, 0xfffffff0
cmp byte [ebp - 1], 0xa
je 0x100282b7
mov byte [ebx], 0xd
inc ebx
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x10028209
jmp 0x100282da
mov eax, dword [esi]
lea eax, [edi + eax + 4]
test byte [eax], 0x40
jne 0x100282d5
or byte [eax], 2
jmp 0x100282da
mov al, byte [ecx]
mov byte [ebx], al
inc ebx
mov eax, ebx
sub eax, dword [ebp - 0x10]
cmp byte [ebp - 2], 1
mov dword [ebp - 0xc], eax
jne 0x100283bc
or eax, eax
je 0x100283bc
dec ebx
mov cl, byte [ebx]
test cl, cl
js 0x10028301
inc ebx
jmp 0x10028387
xor eax, eax
inc eax
movzx ecx, cl
jmp 0x10028318
cmp eax, 4
jg 0x10028321
cmp ebx, dword [ebp - 0x10]
jb 0x10028321
dec ebx
movzx ecx, byte [ebx]
inc eax
cmp byte [ecx + 0x10042120], 0
je 0x10028309
mov dl, byte [ebx]
movzx ecx, dl
movsx ecx, byte [ecx + 0x10042120]
test ecx, ecx
jne 0x1002833e
call fcn.1001cf4c
mov dword [eax], 0x2a
jmp 0x100283b8
inc ecx
cmp ecx, eax
jne 0x10028347
add ebx, eax
jmp 0x10028387
mov ecx, dword [esi]
test byte [ecx + edi + 4], 0x48
je 0x10028375
mov byte [ecx + edi + 5], dl
inc ebx
cmp eax, 2
jl 0x10028363
mov dl, byte [ebx]
mov ecx, dword [esi]
inc ebx
mov byte [edi + ecx + 0x25], dl
cmp eax, 3
jne 0x10028371
mov ecx, dword [esi]
mov dl, byte [ebx]
mov byte [edi + ecx + 0x26], dl
inc ebx
sub ebx, eax
jmp 0x10028387
neg eax
cdq
push 1
push edx
push eax
push dword [ebp + 8]
call fcn.10025f12
sub esp, 0xfffffff0
sub ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
shr eax, 1
push eax
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0x10]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x100283df
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1001cf72
pop ecx
or dword [ebp - 0x14], 0xffffffff
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
je 0x100283cb
push eax
call fcn.1001ca1c
pop ecx
mov eax, dword [ebp - 0x14]
cmp eax, 0xfffffffe
jne 0x10028562
mov eax, dword [ebp - 0xc]
jmp 0x10028562
mov eax, dword [ebp - 0xc]
mov edx, dword [esi]
xor ecx, ecx
cmp eax, ebx
setne cl
add eax, eax
mov dword [ebp - 0xc], eax
mov dword [edi + edx + 0x30], ecx
jmp 0x100283bc
test ecx, ecx
je 0x10028405
cmp word [ebx], 0xa
jne 0x10028405
or byte [eax], 4
jmp 0x10028408
and byte [eax], 0xfb
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, ebx
cmp ebx, eax
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], eax
jae 0x1002851f
mov eax, dword [ebp + 0x10]
movzx ecx, word [eax]
cmp ecx, 0x1a
je 0x10028506
cmp ecx, 0xd
je 0x10028443
mov word [ebx], cx
sub ebx, 0xfffffffe
add eax, 2
mov dword [ebp + 0x10], eax
jmp 0x100284f8
mov ecx, dword [ebp - 0xc]
add ecx, 0xfffffffe
cmp eax, ecx
jae 0x1002846b
lea ecx, [eax + 2]
cmp word [ecx], 0xa
jne 0x10028463
add eax, 4
mov dword [ebp + 0x10], eax
push 0xa
jmp 0x100284f1
mov dword [ebp + 0x10], ecx
jmp 0x100284ef
lea eax, [ebp - 0x18]
add dword [ebp + 0x10], 2
push 0
push eax
push 2
lea eax, [ebp - 8]
push eax
mov eax, dword [esi]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
or eax, eax
jne 0x10028494
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, eax
jne 0x100284ef
cmp dword [ebp - 0x18], 0
je 0x100284ef
mov eax, dword [esi]
test byte [edi + eax + 4], 0x48
je 0x100284cb
cmp word [ebp - 8], 0xa
je 0x1002845c
push 0xd
pop eax
mov word [ebx], ax
mov eax, dword [esi]
mov cl, byte [ebp - 8]
mov byte [edi + eax + 5], cl
mov eax, dword [esi]
mov cl, byte [ebp - 7]
mov byte [edi + eax + 0x25], cl
mov eax, dword [esi]
mov byte [edi + eax + 0x26], 0xa
jmp 0x100284f5
cmp ebx, dword [ebp - 0x10]
jne 0x100284d7
cmp word [ebp - 8], 0xa
je 0x1002845c
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10025f12
add esp, 0x10
cmp word [ebp - 8], 0xa
je 0x100284f8
push 0xd
pop eax
mov word [ebx], ax
sub ebx, 0xfffffffe
mov eax, dword [ebp - 0xc]
cmp dword [ebp + 0x10], eax
jb 0x1002841e
jmp 0x1002851f
mov ecx, dword [esi]
lea edi, [edi + ecx + 4]
test byte [edi], 0x40
jne 0x10028516
or byte [edi], 2
jmp 0x1002851f
mov ax, word [eax]
mov word [ebx], ax
add ebx, 2
sub ebx, dword [ebp - 0x10]
mov dword [ebp - 0xc], ebx
jmp 0x100283bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x1002854e
call fcn.1001cf4c
mov dword [eax], 9
call fcn.1001cf5f
mov dword [eax], esi
jmp 0x100283b8
cmp eax, 0x6d
jne 0x100283b1
and dword [ebp - 0x14], 0
jmp 0x100283bc
xor eax, eax
pop esi
pop ebx
pop edi
leave
ret