Function at 0x10021410
Capabilities:
Get file size

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101ab979
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x10223008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x50], ecx
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
lea edi, [ecx + 0x48]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x18], edi
test edi, edi
je 0x1002149d
mov eax, dword [edi]
test eax, eax
je 0x1002149d
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x50]
mov byte [ebp - 4], 1
mov esi, dword [ecx + 0x3c]
cmp esi, dword [ecx + 0x40]
je 0x10021685
mov edi, dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov dword [ebp - 0x54], eax
sub ecx, dword [esi]
cmp ecx, 0x1d4c0
jbe 0x100214d6
mov ecx, eax
sub ecx, dword [esi + 4]
cmp ecx, 0x4e20
jb 0x10021673
xorps xmm0, xmm0
lea ecx, [ebp - 0x34]
movups xmmword [ebp - 0x34], xmm0
call fcn.1002f690
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x100214fc
cmp dword [ebp - 0x28], 0
jne 0x100214fc
lea ecx, [ebp - 0x28]
push ecx
call eax
lea eax, [esi + 0x88]
mov byte [ebp - 0x58], 0
push eax
lea ecx, [ebp - 0x4c]
call fcn.100050f0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x4c]
cmp dword [ebp - 0x38], 8
push 0
cmovae eax, dword [ebp - 0x4c]
push 0x80
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x5c], eax
cmp eax, 0xffffffff
je 0x10021564
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 0x58]
test eax, eax
push dword [ebp - 0x5c]
movzx ecx, cl
mov eax, 1
cmovne ecx, eax
mov dword [ebp - 0x58], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10021570
push dword [ebp - 0x28]
call eax
cmp byte [ebp - 0x58], 0
je 0x10021617
mov ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x1c], ecx
je 0x100215a8
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
lea eax, [esi + 8]
mov dword [ebp - 0x54], ecx
add ecx, 8
push eax
call fcn.1001adc0
mov byte [ebp - 4], 3
add dword [ebp - 0x20], 0x3f0
jmp 0x100215b2
push esi
push ecx
lea ecx, [ebp - 0x24]
call fcn.10022b30
push esi
lea eax, [ebp - 0x60]
push eax
lea ecx, [edi + 0x3c]
call fcn.10022680
mov esi, dword [eax]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c]
call fcn.100049f0
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x100215dd
push dword [ebp - 0x28]
call eax
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x100215f8
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x34]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x34], ecx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10021679
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x10021679
mov dword [ebp - 0x34], 0
jmp 0x10021679
mov eax, dword [ebp - 0x54]
mov dword [esi + 4], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4c]
call fcn.100049f0
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10021639
push dword [ebp - 0x28]
call eax
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10021654
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x34]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x34], ecx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10021673
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x34]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x34], ecx
add esi, 0x3f0
cmp esi, dword [edi + 0x40]
jne 0x100214b0
mov edi, dword [ebp - 0x18]
mov byte [ebp - 4], 0
test edi, edi
je 0x100216a1
mov eax, dword [edi]
test eax, eax
je 0x1002169a
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x20]
je 0x1002174d
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x18], 0
lea edi, [eax + 0x5c]
mov byte [eax + 0x4c], 1
mov dword [ebp - 0x18], edi
test edi, edi
je 0x100216d5
mov eax, dword [edi]
test eax, eax
je 0x100216d2
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x50]
mov byte [ebp - 4], 7
mov esi, dword [ebp - 0x24]
cmp esi, dword [ebp - 0x20]
je 0x10021729
lea edi, [eax + 0x50]
mov edx, dword [edi + 4]
cmp dword [edi + 8], edx
je 0x10021712
mov eax, dword [esi]
lea ecx, [esi + 8]
mov dword [edx], eax
mov eax, dword [ecx - 4]
push ecx
lea ecx, [edx + 8]
mov dword [ebp - 0x60], edx
mov dword [edx + 4], eax
call fcn.1001adc0
mov byte [ebp - 4], 7
add dword [edi + 4], 0x3f0
jmp 0x1002171b
push esi
push edx
mov ecx, edi
call fcn.10022b30
add esi, 0x3f0
cmp esi, dword [ebp - 0x20]
jne 0x100216e4
mov edi, dword [ebp - 0x18]
lea ecx, [ebp - 0x24]
call fcn.100225f0
mov byte [ebp - 4], 0
test edi, edi
je 0x1002174d
mov eax, dword [edi]
test eax, eax
je 0x10021746
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x100217ec
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x54], esi
cmp esi, edi
je 0x1002178f
nop dword [eax]
mov dword [ebp - 4], 0xffffffff
lea ecx, [esi + 8]
call fcn.10017880
add esi, 0x3f0
mov dword [ebp - 0x54], esi
cmp esi, edi
jne 0x10021770
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
mov eax, 0x82082083
sub ecx, esi
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
imul ecx, eax, 0x3f0
mov eax, esi
cmp ecx, 0x1000
jb 0x100217cd
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100217cd
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.1018d5e5
add esp, 8
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1018d5a4
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret