Function at 0x1006359
Capabilities:
Get file size
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x100a1c4]
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push eax
push eax
push 3
push eax
mov esi, 0x1002cb0
lea edi, [ebp - 0xc]
movsd dword es:[edi], dword [esi]
push 1
push 0x80000000
movsw word es:[edi], word [esi]
push ecx
mov dword [ebp - 0x30], 0x9001b1
mov dword [ebp - 0x14], 0x2000
mov edi, 0x70000
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x34], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
je 0x1006454
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, edi
jae 0x10063cf
mov edi, eax
cmp dword [0x100a2a0], 0
je 0x10063e2
mov dword [ebp - 0x14], 0x200
lea edi, [eax - 0x40]
cmp edi, dword [ebp - 0x14]
jae 0x10063f2
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1006454
sub edi, dword [ebp - 0x14]
mov esi, edi
push esi
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov edi, eax
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov dword [ebp - 0x24], edi
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
push edi
push edi
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
mov edi, dword [ebp - 0x24]
lea eax, [ebp - 0x34]
push eax
push esi
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp - 0x2c], eax
jne 0x100645b
push edi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor eax, eax
jmp 0x10065ce
lea edx, [esi - 0x28]
cmp edx, eax
mov esi, dword [ebp - 0x28]
jbe 0x100656f
cmp byte [eax + edi], 0x89
jne 0x10064cf
cmp byte [eax + edi + 0x20], 0xb8
jne 0x10064cf
cmp byte [eax + edi + 0x11], 0xe8
jne 0x10064cf
cmp byte [eax + edi + 1], 5
jne 0x10064cf
cmp byte [eax + edi + 0xb], 0x89
jne 0x10064cf
cmp byte [eax + edi + 0x16], 0x48
jne 0x10064cf
cmp byte [eax + edi + 0x17], 0x8d
jne 0x10064cf
cmp byte [eax + edi + 0x1d], 0x33
jne 0x10064cf
cmp byte [eax + edi + 0x1e], 0xd2
jne 0x10064cf
mov cl, byte [eax + edi + 6]
cmp cl, 0xb8
jne 0x10064b9
mov dword [ebp - 0x18], 1
jmp 0x10064c5
cmp cl, 0xe8
jne 0x10064cf
mov dword [ebp - 0x18], 2
mov ecx, dword [ebp - 0x14]
inc dword [ebp - 0x10]
lea esi, [eax + ecx + 6]
inc eax
cmp eax, edx
jb 0x1006469
xor edx, edx
inc edx
cmp dword [ebp - 0x10], edx
jne 0x100656f
test esi, esi
jbe 0x100656f
sub edi, dword [ebp - 0x14]
and dword [ebp - 0x10], 0
add edi, esi
xor eax, eax
cmp byte [eax + edi], 0x48
jne 0x1006564
cmp byte [eax + edi + 0x1c], 0x48
jne 0x1006564
cmp byte [eax + edi + 0x16], 0x89
jne 0x1006564
cmp byte [eax + edi + 1], 0x8d
jne 0x1006564
cmp byte [eax + edi + 5], 0x41
jne 0x1006564
cmp byte [eax + edi + 6], 0xb9
jne 0x1006564
cmp byte [eax + edi + 0xe], 0x45
jne 0x1006564
cmp byte [eax + edi + 0xf], 0x33
jne 0x1006564
cmp byte [eax + edi + 0x11], 0x48
jne 0x1006564
mov cl, byte [eax + edi + 0xb]
cmp cl, 0xb1
jne 0x1006543
or dword [ebx + 0xc], 0xffffffff
mov dword [ebp - 0x18], edx
jmp 0x100655a
cmp cl, 0xf
jne 0x1006564
cmp byte [eax + edi + 0xc], 0x94
jne 0x1006564
and dword [ebx + 0xc], 0
mov dword [ebp - 0x18], 2
inc dword [ebp - 0x10]
lea ecx, [eax + esi + 0xb]
mov dword [ebp - 0x20], ecx
inc eax
cmp eax, 0x100
jb 0x10064f3
mov edi, dword [ebp - 0x24]
push edi
call dword [sym.imp.msvcrt.dll_free]
mov eax, dword [ebp - 0x10]
cmp eax, 1
pop ecx
mov dword [ebx + 0x1dc], eax
jne 0x10065b8
mov eax, dword [ebp - 0x20]
and dword [ebx + 0xc], 0
mov dword [ebx + 4], esi
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [ebx], eax
mov dword [ebx + 0x10], 5
lea esi, [ebp - 0xc]
lea edi, [ebx + 0x18]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov dword [ebx + 0x14], 3
lea esi, [ebp - 0x30]
lea edi, [ebx + 0x38]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x10065cb
xor eax, eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov dword [ebx], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], eax
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01007a24
leave
ret 8