Function at 0x1004416
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84c
movzx eax, word [ebp + 0xc]
push ebx
mov ebx, eax
push esi
shl ebx, 2
push ebx
push 0x40
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
xor esi, esi
cmp eax, esi
mov dword [ebp - 0xc], eax
jne 0x100444a
xor eax, eax
jmp 0x1004684
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
push esi
push 0x38
push dword [ebp + 8]
call edi
push esi
lea eax, [ebp - 8]
push eax
push ebx
push dword [ebp - 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp + 8]
call ebx
movzx eax, word [ebp + 0xc]
lea eax, [eax + eax - 1]
push eax
push dword [ebp + 0x18]
call fcn.01006724
movzx eax, word [ebp + 0xc]
cmp eax, esi
mov dword [ebp + 0x18], esi
jbe 0x1004677
push dword [ebp + 0x18]
call fcn.01006854
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x18]
mov word [ebp - 0x64c], si
mov word [ebp - 0x84c], si
mov word [ebp - 0x44c], si
mov word [ebp - 0x28], si
mov eax, dword [eax + ecx*4]
cmp eax, esi
je 0x10045b1
cmp eax, dword [ebp + 0x10]
ja 0x1004564
push esi
push esi
push eax
push dword [ebp + 8]
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0x20
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
call ebx
cmp dword [ebp - 8], 0x20
jne 0x1004564
push dword [ebp + 0x10]
lea eax, [ebp - 0x30]
push eax
call fcn.01003c1c
test eax, eax
je 0x1004564
push esi
push esi
push dword [ebp - 0x1c]
push dword [ebp + 8]
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0x200
lea eax, [ebp - 0x24c]
push eax
push dword [ebp + 8]
call ebx
cmp word [ebp - 0x24c], si
je 0x1004564
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x64c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
push esi
push dword [ebp - 0x18]
push dword [ebp + 8]
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0x200
lea eax, [ebp - 0x24c]
push eax
push dword [ebp + 8]
call ebx
cmp word [ebp - 0x24c], si
jne 0x1004569
mov word [ebp - 0x64c], si
mov dword [ebp - 4], esi
jmp 0x10045b1
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x84c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
push esi
push dword [ebp - 0x14]
push dword [ebp + 8]
call edi
push esi
lea eax, [ebp - 8]
push eax
push 0x200
lea eax, [ebp - 0x24c]
push eax
push dword [ebp + 8]
call ebx
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x44c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x4c]
push eax
call fcn.01004127
cmp word [ebp - 0x64c], si
je 0x1004654
push esi
push esi
lea eax, [ebp - 0x64c]
push eax
call fcn.01003a75
lea eax, [ebp - 0x64c]
push eax
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
lea eax, [ebp - 0x84c]
push eax
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.COMCTL32.dll_Str_SetPtrW]
mov eax, dword [ebp - 0x22]
cmp ax, si
mov dword [ebp - 0x10], eax
jne 0x100464c
cmp word [ebp - 0x44c], si
jne 0x100463a
lea eax, [ebp - 0x44c]
push eax
push esi
lea eax, [ebp - 0x84c]
push eax
call dword [sym.imp.SHELL32.dll_FindExecutableW]
cmp word [ebp - 0x44c], si
je 0x100464c
push dword [ebp - 0x28]
lea eax, [ebp - 0x44c]
push eax
call fcn.01004388
mov dword [ebp - 0x10], eax
mov ax, word [ebp - 0x10]
mov word [ebp - 0x3c], ax
lea eax, [ebp - 0x4c]
push eax
push dword [ebp + 0x18]
push dword [0x1009258]
call dword [sym.imp.COMCTL32.dll_DSA_InsertItem]
movzx eax, word [ebp + 0xc]
inc dword [ebp + 0x18]
cmp dword [ebp + 0x18], eax
jb 0x100448e
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x14