Function at 0x1009799
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x101348c]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov dword [ebp - 0x1ac], eax
call edi
and word [0x102da00], 0
shl eax, 1
shr eax, 1
push esi
mov dword [ebp - 0x1a0], eax
call edi
test eax, eax
je 0x1009955
push dword [ebp - 0x1ac]
call edi
test eax, eax
je 0x1009955
push 3
push 0x80000000
push esi
push ebx
call fcn.0100c756
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x19c], esi
je 0x1009955
lea eax, [ebp - 0x228]
push eax
push esi
push ebx
call fcn.01008c4d
test eax, eax
je 0x100987d
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0x194]
push eax
push esi
call fcn.01008ce4
cmp word [ebp - 0x2c], 0
jne 0x1009856
mov esi, dword [sym.imp.USER32.dll_MessageBeep]
push 0xffffffffffffffff
call esi
push 0xffffffffffffffff
call esi
push dword [ebp - 0x19c]
jmp 0x100987e
movzx eax, word [ebp - 0x2c]
imul eax, eax, 0x64
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [ebp - 0x1b4], eax
jne 0x1009889
push 1
push ebx
push 0x3ec
call fcn.0100b820
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1009955
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
test esi, esi
jne 0x10098a8
push 1
push ebx
push 0x3ed
call fcn.0100b820
jmp 0x100993d
lea eax, [ebp - 0x228]
push eax
movzx eax, word [ebp - 0x2c]
push esi
push eax
push dword [ebp - 0x19c]
call fcn.01008d78
movzx edx, word [ebp - 0x2c]
xor eax, eax
test edx, edx
jbe 0x100991a
mov ecx, esi
mov bl, byte [ecx]
test bl, bl
mov byte [ebp - 0x195], bl
jne 0x10098e8
movzx ebx, byte [ecx + 1]
cmp dword [ebp - 0x1a0], ebx
je 0x1009969
cmp byte [ebp - 0x195], 1
jne 0x10098fd
movzx ebx, byte [ecx + 1]
cmp dword [ebp - 0x1a0], ebx
jge 0x1009969
cmp byte [ebp - 0x195], 2
jne 0x1009912
movzx ebx, byte [ecx + 1]
cmp dword [ebp - 0x1a0], ebx
jle 0x1009969
inc eax
add ecx, 0x64
cmp eax, edx
jb 0x10098cc
push 1
call dword [sym.imp.USER32.dll_GetFocus]
push eax
push 0x4bb
call fcn.0100b820
movzx eax, word [ebp - 0x94]
and word [eax*2 + 0x102da00], 0
push dword [ebp - 0x19c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x1b4]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, 0x102da00
pop ebx
call fcn.0100dd00
leave
ret 0xc
imul eax, eax, 0x64
xor ecx, ecx
add eax, esi
cmp word [eax + 2], cx
mov dword [ebp - 0x1b0], ecx
mov dword [ebp - 0x1a4], ecx
mov dword [ebp - 0x1b8], eax
jbe 0x100992d
lea ebx, [eax + 4]
movzx eax, word [ebx + 4]
cmp eax, dword [ebp - 0x1a0]
mov dword [ebp - 0x1a8], eax
jbe 0x10099a9
mov eax, dword [ebp - 0x1a0]
mov dword [ebp - 0x1a8], eax
xor esi, esi
cmp dword [ebx], esi
jne 0x10099bb
mov ecx, dword [ebp - 0x1ac]
lea eax, [ecx + eax*4 - 4]
jmp 0x10099cc
mov ecx, dword [ebp - 0x1a0]
sub ecx, eax
mov eax, dword [ebp - 0x1ac]
lea eax, [eax + ecx*4]
push eax
lea eax, [ebp - 0xc]
push 2
push eax
call fcn.0100b7db
lea eax, [ebp - 0xc]
push eax
mov word [ebp - 8], si
call fcn.0100bd2b
cmp eax, esi
mov dword [ebp - 0x1a8], eax
jl 0x1009ac1
cmp eax, 0x6f70
jae 0x1009ac1
movzx ecx, word [ebp - 0x94]
imul ecx, eax
mov eax, dword [ebp - 0x1f4]
push esi
push esi
lea eax, [eax + ecx*2]
push eax
push dword [ebp - 0x19c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0x1a8]
push eax
movzx eax, word [ebp - 0x94]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x19c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x94]
mov word [ebp + eax*2 - 0x28], si
lea eax, [ebp - 0x28]
push eax
call edi
movzx ecx, word [ebx + 6]
cmp ecx, esi
mov dword [ebp - 0x1a8], ecx
jne 0x1009a8b
movzx ecx, word [ebp - 0x94]
mov edx, dword [ebp - 0x1b0]
add eax, edx
cmp eax, ecx
jbe 0x1009a7a
sub ecx, edx
mov word [ebp + ecx*2 - 0x28], si
lea eax, [ebp - 0x28]
push eax
push 0x102da00
call dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x1009ae4
cmp ecx, eax
jbe 0x1009a97
mov ecx, eax
mov dword [ebp - 0x1a8], ecx
mov ax, word [ebp + ecx*2 - 0x2a]
cmp ax, si
jne 0x1009ab6
cmp ecx, 1
jbe 0x1009aad
movzx eax, word [ebp + ecx*2 - 0x2c]
jmp 0x1009ab9
movzx eax, word [ebp - 0x90]
jmp 0x1009ab9
movzx eax, ax
mov ecx, dword [ebp - 0x1a4]
jmp 0x1009adc
mov ecx, dword [ebp - 0x1a4]
cmp ecx, esi
jbe 0x1009ad5
movzx eax, word [ecx*2 + 0x102d9fe]
jmp 0x1009adc
movzx eax, word [ebp - 0x90]
mov word [ecx*2 + 0x102da00], ax
push 0x102da00
call edi
inc dword [ebp - 0x1a4]
mov dword [ebp - 0x1b0], eax
mov eax, dword [ebp - 0x1b8]
movzx eax, word [eax + 2]
add ebx, 8
cmp dword [ebp - 0x1a4], eax
jb 0x100998b
jmp 0x100992d