Function at 0x10022350
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1013b189
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
push ebx
push esi
push edi
mov eax, dword [0x1017a974]
xor eax, esp
push eax
lea eax, [esp + 0xe0]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp byte [edi + 0xc], bl
jne 0x100226e0
lea eax, [edi + 0x38]
push eax
mov dword [esp + 0x1c], eax
mov byte [esp + 0x20], bl
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0xe8], ebx
xor eax, eax
xor esi, esi
mov dword [esp + 0x50], eax
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x4c], esi
lea eax, [esp + 0x18]
push edi
lea esi, [esp + 0x4c]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x58], ecx
mov byte [esp + 0x5d], bl
mov byte [esp + 0x5e], bl
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], 0xffffffff
mov dword [esp + 0x68], eax
mov byte [esp + 0x6c], bl
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov byte [esp + 0x5c], bl
call fcn.10021a90
test al, al
je 0x100226c8
cmp dword [esp + 0x5c], 2
jbe 0x100226c8
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x80]
push edx
call fcn.10023430
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0xec], 1
call fcn.10022ff0
mov byte [esp + 0xe8], 2
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x84]
push eax
push ecx
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0xd0]
push edx
lea eax, [esp + 0x8c]
push eax
call fcn.10023700
lea ebx, [esp + 0x5c]
lea edi, [esp + 0x2c]
call fcn.10023150
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov eax, edi
sub eax, ecx
xor ebx, ebx
xor esi, esi
sar eax, 2
mov dword [esp + 0x20], esi
cmp eax, ebx
jbe 0x100225f7
mov edi, dword [ebp + 8]
add edi, 0x10
mov dword [esp + 0x24], edi
jmp 0x1002249c
mov edi, dword [esp + 0x24]
cmp esi, eax
jb 0x100224a9
call fcn.100d63f7
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + esi*4]
xor esi, esi
mov dword [esp + 0x44], ecx
mov dword [esp + 0x28], esi
jmp 0x100224c4
mov edi, dword [esp + 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x44]
mov eax, dword [ebp + 8]
push esi
push edx
push eax
mov byte [esp + 0xf4], 3
call fcn.10020c30
push edi
mov esi, eax
mov byte [esp + 0xec], 2
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x14], esi
cmp esi, 2
jbe 0x100225c0
mov ebx, dword [esp + 0x98]
mov edi, dword [esp + 0x84]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x84]
push eax
call fcn.100234e0
mov eax, dword [esp + 0x74]
test eax, eax
je 0x10022531
cmp eax, edi
je 0x10022536
call fcn.100d63f7
cmp dword [esp + 0x78], ebx
jne 0x100225c0
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x84]
push eax
push ecx
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0xdc]
push edx
lea eax, [esp + 0x8c]
push eax
call fcn.10023700
mov edx, dword [esp + 0x38]
test edx, edx
jne 0x10022576
xor ecx, ecx
jmp 0x1002257f
mov ecx, dword [esp + 0x40]
sub ecx, edx
sar ecx, 2
mov eax, dword [esp + 0x3c]
mov edi, eax
sub edi, edx
sar edi, 2
cmp edi, ecx
jae 0x10022599
mov dword [eax], esi
add eax, 4
mov dword [esp + 0x3c], eax
jmp 0x100225c0
mov esi, eax
cmp edx, eax
jbe 0x100225a4
call fcn.100d63f7
mov eax, dword [esp + 0x2c]
push esi
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0xd0]
push edx
lea eax, [esp + 0x3c]
call fcn.10023d40
mov esi, dword [esp + 0x28]
inc esi
cmp esi, 0x101
mov dword [esp + 0x28], esi
jl 0x100224c0
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x20]
mov eax, edi
sub eax, ecx
inc esi
sar eax, 2
xor ebx, ebx
mov dword [esp + 0x20], esi
cmp esi, eax
jb 0x10022498
sub edi, ecx
sar edi, 2
cmp ecx, ebx
je 0x10022609
push ecx
call fcn.100d59a5
add esp, 4
mov eax, dword [esp + 0x2c]
push eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
call fcn.100d59a5
mov eax, dword [esp + 0xb0]
add esp, 4
cmp eax, ebx
je 0x10022636
push eax
call fcn.100d59a5
add esp, 4
mov ecx, dword [esp + 0xa0]
push ecx
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xb4], ebx
mov dword [esp + 0xb8], ebx
call fcn.100d59a5
add esp, 4
lea esi, [esp + 0x84]
call fcn.100249e0
mov edx, dword [esp + 0x84]
push edx
call fcn.100d59a5
add esp, 4
cmp byte [esp + 0x1c], 0
je 0x100226a3
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp byte [esp + 0x1c], bl
je 0x100226d5
mov edx, dword [esp + 0x18]
push edx
jmp 0x100226da
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4