Function at 0x1021f46
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor edi, edi
xor esi, esi
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
cmp dword [ebp + 8], edi
jne 0x1021f70
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10221a7
push edi
push edi
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 4], ebx
cmp ebx, 0xffffffff
jne 0x1021fc4
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10134b0
call ebx
push eax
call fcn.010285de
call ebx
test eax, eax
je 0x1022139
call ebx
test eax, eax
jne 0x1022139
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1022139
lea eax, [ebp - 0x10]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1022002
push 0x1013450
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
push eax
call fcn.010285de
call ebx
test eax, eax
je 0x1022134
call ebx
test eax, eax
jne 0x1022134
call ebx
push eax
jmp 0x102212e
cmp dword [ebp - 0xc], edi
je 0x1022028
push 0x1013400
push 0x18
call fcn.010285de
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1022134
push 0x18
jmp 0x102212e
push 0x30
push ebx
call fcn.0102a7d0
mov dword [ebp - 8], eax
cmp eax, edi
jne 0x102203e
push 0x1013390
jmp 0x1021fd8
mov ebx, dword [ebp - 0x10]
call fcn.01021dfe
test eax, eax
jne 0x1022051
push 0x1013328
jmp 0x1021fd8
push 0x38
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, edi
je 0x1022116
mov ebx, dword [ebp - 8]
push 8
push dword [ebp - 4]
mov dword [esi], 6
mov dword [esi + 0xc], ebx
call fcn.0102a7d0
mov dword [esi + 0x10], eax
mov eax, dword [ebx + 0x10]
cmp eax, edi
jbe 0x10220a9
imul eax, eax, 0x48
push eax
push dword [ebp - 4]
call fcn.0102a7d0
mov dword [esi + 0x14], eax
cmp eax, edi
jne 0x10220ac
push 0x10132b8
jmp 0x1021fd8
mov dword [esi + 0x14], edi
mov eax, dword [ebx + 0x1c]
cmp eax, edi
jbe 0x10220d0
shl eax, 4
push eax
push dword [ebp - 4]
call fcn.0102a7d0
mov dword [esi + 0x18], eax
cmp eax, edi
jne 0x10220d3
push 0x1013240
jmp 0x1021fd8
mov dword [esi + 0x18], edi
mov ebx, dword [ebx + 0x14]
cmp ebx, edi
jbe 0x10220f7
lea eax, [ebx + ebx]
push eax
push dword [ebp - 4]
call fcn.0102a7d0
mov dword [esi + 0x1c], eax
cmp eax, edi
jne 0x10220fa
push 0x10131d0
jmp 0x1021fd8
mov dword [esi + 0x1c], edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 8]
call fcn.0101e529
mov dword [esi + 0x20], eax
cmp eax, edi
jne 0x10221ab
push 0x10131a0
push 8
call fcn.010285de
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1022134
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 4], edi
je 0x1022142
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp esi, edi
je 0x1022195
mov eax, dword [esi + 0xc]
cmp eax, edi
je 0x1022166
cmp dword [ebp - 8], eax
jne 0x102215b
mov dword [ebp - 8], edi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov eax, dword [esi + 0x14]
cmp eax, edi
je 0x1022178
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov eax, dword [esi + 0x1c]
cmp eax, edi
je 0x102218a
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
cmp dword [ebp - 8], edi
je 0x10221a7
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
xor eax, eax
jmp 0x10221c5
lea ecx, [esi + 0x28]
lea edx, [esi + 0x30]
push ecx
push edx
push eax
mov dword [ecx], edi
mov dword [ecx + 4], edi
mov dword [edx], edi
mov dword [edx + 4], edi
call fcn.0101cb80
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4