Function at 0x10021802
Capabilities:
Get file size
Read file via mapping

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
xor edi, edi
and dword [ebp - 4], edi
mov ebx, ecx
mov esi, 0x80070057
cmp dword [ebp + 8], edi
jne 0x1002184e
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b22
test byte [eax + 0x1c], 1
je 0x10021b22
push 0x1000bea8
push 0x36
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.1000c7e1
jmp 0x10021b22
xor esi, esi
push esi
push dword [ebp + 8]
call sub.KERNEL32.dll_GetFileSize
mov dword [ebp - 8], eax
add eax, 0xffffff68
cmp eax, 0x7ff68
ja 0x10021ae2
push esi
push esi
push esi
push 2
push esi
push dword [ebp + 8]
call sub.KERNEL32.dll_CreateFileMappingW
mov dword [ebp - 4], eax
test eax, eax
jne 0x100218ca
call sub.KERNEL32.dll_GetLastError
mov esi, eax
test esi, esi
jle 0x10021898
and esi, 0xffff
or esi, 0x80070000
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b22
test byte [eax + 0x1c], 1
je 0x10021b22
push esi
push 0x1000bea8
push 0x38
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.1001334b
jmp 0x10021b22
push esi
push esi
push esi
push 4
push eax
call sub.KERNEL32.dll_MapViewOfFile
mov edi, eax
test edi, edi
jne 0x10021924
call sub.KERNEL32.dll_GetLastError
mov esi, eax
test esi, esi
jle 0x100218f2
and esi, 0xffff
or esi, 0x80070000
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b15
test byte [eax + 0x1c], 1
je 0x10021b15
push esi
push 0x1000bea8
push 0x39
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.1001334b
jmp 0x10021b15
cmp dword [edi], reloc.ADVAPI32.dll_TraceMessage
je 0x10021957
mov esi, 0x90070a0b
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b0b
test byte [eax + 0x1c], 1
je 0x10021b0b
push 0x1000bea8
push 0x3a
jmp 0x10021b00
lea eax, [ebx + 8]
lea ecx, [edi + 0x18]
push eax
push ecx
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x1002199a
mov esi, 0x90070a0b
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b0b
test byte [eax + 0x1c], 1
je 0x10021b0b
lea ecx, [edi + 0x18]
push ecx
push 0x1000bea8
push 0x3b
jmp 0x10021a4b
mov eax, dword [edi + 4]
cmp eax, dword [ebx + 4]
je 0x100219cd
mov esi, 0x90070a0b
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b0b
test byte [eax + 0x1c], 1
je 0x10021b0b
push 0x1000bea8
push 0x3c
jmp 0x10021b00
lea eax, [edi + 0x10]
push eax
call fcn.1002005e
test eax, eax
je 0x10021a05
mov esi, 0x90070a0a
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b0b
test byte [eax + 0x1c], 1
je 0x10021b0b
push 0x1000bea8
push 0x3d
jmp 0x10021b00
push dword [ebp + 0x10]
mov ecx, ebx
push 0x1000bde0
push dword [ebp + 0xc]
call fcn.1002247c
mov esi, eax
test esi, esi
jns 0x10021a5b
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b0b
test byte [eax + 0x1c], 1
je 0x10021b0b
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x10021a43
mov ecx, 0x1000c644
push ecx
push 0x1000bea8
push 0x3e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.10013378
jmp 0x10021b0b
push dword [ebp - 8]
mov ecx, ebx
push edi
call fcn.10022b40
mov esi, eax
test esi, esi
jns 0x10021a9b
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b0b
test byte [eax + 0x1c], 1
je 0x10021b0b
push esi
push 0x1000bea8
push 0x3f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.1001334b
jmp 0x10021b0b
mov eax, dword [ebx + 0x90]
mov ecx, dword [ebx + 0x88]
cmp eax, ecx
jae 0x10021ad6
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021acf
test byte [eax + 0x1c], 1
je 0x10021acf
push 0x1000bea8
push 0x40
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.1000c7e1
mov esi, 0x80004005
jmp 0x10021b0b
sub eax, ecx
mov dword [ebx + 0x8c], eax
xor esi, esi
jmp 0x10021b0b
mov esi, 0x90070a0b
mov eax, dword [0x100320c8]
cmp eax, 0x100320c8
je 0x10021b22
test byte [eax + 0x1c], 1
je 0x10021b22
push 0x1000bea8
push 0x37
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.1000c7e1
test edi, edi
je 0x10021b15
push edi
call sub.KERNEL32.dll_UnmapViewOfFile
mov eax, dword [ebp - 4]
test eax, eax
je 0x10021b22
push eax
call sub.KERNEL32.dll_CloseHandle
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc