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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
push 0x5201c0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x20]
push eax
call fcn.004922f0
mov ebx, eax
xor edi, edi
add esp, 4
cmp ebx, edi
jne 0x49224b
mov ebp, dword [esp + 0x28]
xor ebx, ebx
cmp ebp, edi
mov dword [esp + 0x14], edi
jbe 0x492095
mov ecx, dword [esp + 0x2c]
lea edx, [ecx + 4]
mov dword [esp + 0x10], ebp
add ebx, dword [edx]
xor eax, eax
mov ecx, 0x14
lea edi, [edx + 0xc]
rep stosd dword es:[edi], eax
mov esi, dword [edx]
xor ecx, ecx
test esi, esi
jbe 0x492078
mov eax, dword [edx + 8]
add eax, 4
add ecx, dword [eax]
add eax, 0xc
dec esi
jne 0x492070
cmp ecx, dword [esp + 0x14]
mov dword [edx + 4], ecx
jbe 0x492085
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x10]
add edx, 0x60
dec eax
mov dword [esp + 0x10], eax
jne 0x492054
xor edi, edi
lea eax, [ebx + ebp*8]
lea edx, [eax + eax*2]
lea eax, [edx*4 + 0x10c]
push 0x20
push eax
call fcn.0047fff0
mov ebx, eax
add esp, 8
cmp ebx, edi
jne 0x4920c8
push 0x5201c0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
mov edx, dword [esp + 0x34]
lea eax, [ebx + 0x10c]
lea esi, [ebp + ebp*2]
shl esi, 5
lea ecx, [esi + eax]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x30]
push edx
mov dword [ebx + 0x50], eax
mov eax, dword [esp + 0x3c]
push eax
inc ecx
push ecx
push ebx
call fcn.00492360
mov eax, dword [esp + 0x3c]
mov edi, dword [ebx + 0x50]
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
add esp, 0x10
cmp ebp, esi
jbe 0x4921a8
mov ecx, dword [esp + 0x2c]
lea ebp, [eax + 4]
mov eax, 0xfffffffc
sub eax, ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], eax
mov dword [esp + 0x2c], ecx
jmp 0x492140
mov eax, dword [esp + 0x18]
nop
lea esp, [esp]
mov edx, dword [ebx + 0x50]
mov edi, dword [esp + 0x10]
add eax, ebp
mov dword [edx + eax + 0xc], edi
mov ecx, dword [ebp]
mov esi, dword [ebp + 8]
lea ecx, [ecx + ecx*2]
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp]
lea ecx, [ecx + ecx*2]
lea ecx, [edx + ecx*4]
mov edx, dword [esp + 0x34]
push edx
mov edx, dword [ebx + 0x50]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x3c]
push ecx
lea eax, [edx + eax + 0x10]
push 8
push eax
call fcn.00492360
mov eax, dword [esp + 0x3c]
add esp, 0x10
add ebp, 0x60
dec eax
mov dword [esp + 0x2c], eax
jne 0x492137
mov ebp, dword [esp + 0x28]
xor esi, esi
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
mov dword [ebx + 0x58], edx
mov edx, dword [esp + 0x20]
mov dword [ebx + 0x54], ecx
mov ecx, dword [esp + 0x14]
push esi
push edx
mov dword [ebx + 0x60], esi
mov dword [ebx + 0x5c], esi
mov dword [ebx + 0x70], eax
mov dword [ebx + 0x68], 1
mov dword [ebx + 0x78], ebp
mov dword [ebx + 0x7c], ecx
mov dword [ebx + 0x74], esi
call fcn.004800e0
add esp, 8
cmp eax, esi
mov dword [ebx + 0x88], eax
jne 0x49220d
push ebx
call fcn.00480080
add esp, 4
push 0x5201c0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
lea eax, [ebx + 0x8c]
push eax
call fcn.00483930
add esp, 4
lea ecx, [ebx + 0xe8]
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea edx, [ebx + 0x100]
mov dword [ebx + 0x108], ebx
mov eax, dword [0x51fd80]
push edx
push eax
call fcn.004892d0
add esp, 8
mov dword [0x51fd80], eax
xor edi, edi
mov ecx, dword [ebx + 0x7c]
add ecx, 0x58
push 0x20
push ecx
call fcn.0047fff0
mov esi, eax
add esp, 8
cmp esi, edi
jne 0x492277
push 0x5201c0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
mov ecx, dword [ebx + 0x80]
push edi
lea edx, [esi + 0x2c]
push edx
lea eax, [ebx + 0x8c]
inc ecx
push eax
mov dword [ebx + 0x80], ecx
call fcn.004839e0
lea ecx, [esi + 0x4c]
mov dword [esi + 0x54], esi
mov edx, dword [0x51fd7c]
push ecx
push edx
call fcn.004892d0
add esp, 0x14
push 0x5201c0
mov dword [0x51fd7c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x24]
lea eax, [esi + 0x58]
mov dword [esi + 0x28], eax
or eax, 0xffffffff
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0x24], edi
pop edi
mov dword [esi + 0xc], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], eax
mov dword [esi], ebx
mov dword [esi + 0x1c], ecx
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret