Function at 0x1008082
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x848
mov eax, dword [0x101348c]
mov edx, dword [ebp + 0x18]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x810], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x828], eax
xor eax, eax
cmp dword [ebp + 0x1c], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x848], edx
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x808], eax
mov dword [ebp - 0x824], eax
mov dword [ebp - 0x818], eax
mov dword [ebp - 0x83c], eax
jne 0x1008113
push 0x40
pop ecx
mov edi, edx
rep stosd dword es:[edi], eax
and word [edx + 0x100], ax
push 0x18
pop ecx
lea edi, [edx + 0x104]
mov byte [edx + 0x164], 1
rep stosd dword es:[edi], eax
mov word [edx + 0x168], ax
mov word [edx + 0x102], ax
mov word [edx + 0x166], ax
push 3
push 0x80000000
push esi
push dword [ebp - 0x810]
call fcn.0100c756
cmp eax, 0xffffffff
mov dword [ebp - 0x814], eax
jne 0x100813b
mov eax, 0xfffffc15
jmp 0x10084f1
mov esi, 0x4000
push esi
push 0x42
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push eax
mov dword [ebp - 0x81c], eax
call dword [sym.imp.KERNEL32.dll_LocalLock]
push 0x7f02
xor edi, edi
push edi
mov dword [ebp - 0x820], eax
call dword [sym.imp.USER32.dll_LoadCursorW]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push edi
push edi
push edi
push dword [ebp - 0x814]
mov dword [ebx], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [ebp - 0x80c]
push eax
push esi
push dword [ebp - 0x820]
push dword [ebp - 0x814]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100836a
mov eax, dword [ebp - 0x820]
neg eax
mov dword [ebp - 0x838], eax
shr dword [ebp - 0x80c], 1
push 0x10013a4
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, dword [ebp - 0x80c]
xor eax, eax
cmp ecx, edi
mov dword [ebp - 0x834], edi
jle 0x1008334
mov ecx, dword [ebp - 0x820]
mov dword [ebp - 0x840], ecx
mov edx, dword [ebp - 0x840]
mov cx, word [edx]
cmp cx, 0xd
je 0x1008315
cmp cx, 0xfeff
je 0x1008315
cmp cx, 0xa
jne 0x1008454
mov word [ebp + eax*2 - 0x804], di
lea eax, [ebp - 0x804]
push eax
mov dword [ebp - 0x82c], edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 6
jl 0x100830f
push 0x10013f0
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x100826e
mov eax, dword [ebp - 0x844]
add eax, 0xfffffffe
mov dword [ebx], eax
xor eax, eax
inc eax
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x818], eax
jmp 0x10082fd
push 0x1001438
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1008294
mov dword [ebp - 0x808], 1
mov dword [ebp - 0x818], edi
push 0x100140c
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x10082ba
mov dword [ebp - 0x824], 1
mov dword [ebp - 0x818], edi
cmp dword [ebp - 0x808], edi
jne 0x10082ca
cmp dword [ebp - 0x824], edi
je 0x10082de
cmp dword [ebp - 0x830], edi
je 0x10082de
cmp dword [ebp - 0x818], edi
je 0x1008482
cmp dword [ebp - 0x818], edi
je 0x10082fd
cmp dword [ebp + 0x1c], edi
jne 0x10082fd
push dword [ebp - 0x848]
lea eax, [ebp - 0x804]
push eax
call fcn.01007eff
push 0x10013a4
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0x82c]
inc dword [ebp - 0x834]
mov ecx, dword [ebp - 0x80c]
add dword [ebp - 0x840], 2
cmp dword [ebp - 0x834], ecx
jl 0x10081ed
lea eax, [ecx + ecx]
cmp eax, esi
jb 0x100836a
add dword [ebp - 0x83c], esi
add dword [ebp - 0x838], esi
push edi
lea eax, [ebp - 0x80c]
push eax
push esi
push dword [ebp - 0x820]
push dword [ebp - 0x814]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10081b3
mov ecx, dword [ebp - 0x80c]
sub ecx, dword [ebx]
mov ebx, dword [ebp - 0x830]
add ecx, dword [ebp - 0x83c]
cmp ebx, edi
mov eax, dword [ebp - 0x828]
mov dword [eax], ecx
jne 0x100838c
mov dword [eax], edi
push dword [ebp - 0x81c]
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
push dword [ebp - 0x81c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x814]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp dword [ebp - 0x808], edi
jne 0x10083cf
push 1
push dword [ebp - 0x810]
push 0x51f
call fcn.0100b820
push 4
pop esi
cmp ebx, edi
jne 0x10083f0
cmp dword [ebp - 0x808], edi
je 0x10083ed
push 1
push dword [ebp - 0x810]
push 0x451
call fcn.0100b820
or esi, 1
cmp dword [ebp - 0x824], edi
jne 0x1008419
cmp dword [ebp - 0x808], edi
je 0x1008416
cmp ebx, edi
je 0x1008416
push 3
push dword [ebp - 0x810]
push 0x4bd
call fcn.0100b820
or esi, 2
push 0x7f00
push edi
call dword [sym.imp.USER32.dll_LoadCursorW]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
cmp ebx, edi
je 0x10084ed
cmp dword [ebp - 0x824], edi
je 0x10084ed
cmp dword [ebp - 0x808], edi
je 0x10084ed
xor eax, eax
inc eax
jmp 0x10084f1
cmp eax, edi
jne 0x1008466
mov ecx, dword [ebp - 0x838]
add ecx, edx
mov dword [ebp - 0x844], ecx
cmp eax, 0x400
jge 0x1008315
mov cx, word [edx]
mov word [ebp + eax*2 - 0x804], cx
inc eax
jmp 0x1008315
mov eax, dword [ebp - 0x844]
sub eax, dword [ebx]
cmp dword [ebp + 0x1c], edi
mov ecx, dword [ebp - 0x828]
mov dword [ecx], eax
jne 0x10084ae
push dword [ebp - 0x848]
push dword [ebp - 0x810]
call fcn.01007da2
mov dword [ebp - 0x828], eax
push dword [ebp - 0x81c]
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
push dword [ebp - 0x81c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x814]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x7f00
push edi
call dword [sym.imp.USER32.dll_LoadCursorW]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, dword [ebp - 0x828]
jmp 0x10084f1
mov eax, esi
neg eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0100dd00
leave
ret 0x18