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

Disassembly:
sub esp, 0x24
mov eax, dword [esp + 0x38]
push ebx
mov ebx, ecx
push ebp
push esi
mov dword [eax], 0
lea esi, [ebx + 8]
mov dword [eax + 4], 0
mov ebp, dword [ebx + 0x78]
push esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebx + 0x64], ebp
jae 0x4744ee
push ebp
push dword [ebx + 0x44]
call fcn.0040be90
add esp, 8
test eax, eax
jne 0x4744e8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebp
mov eax, 0x821803e8
pop ebx
add esp, 0x24
ret 0x20
mov dword [ebx + 0x44], eax
mov dword [ebx + 0x64], ebp
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x34]
add eax, edx
mov ecx, dword [ebx + 0x34]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x40]
push edi
mov edi, dword [esp + 0x3c]
adc eax, edi
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0x30]
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], edi
test ecx, ecx
jl 0x474540
jg 0x47452a
test eax, eax
jb 0x474540
cmp dword [esp + 0x40], ecx
jl 0x474540
jg 0x474538
cmp dword [esp + 0x18], eax
jbe 0x474540
mov dword [esp + 0x18], eax
mov dword [esp + 0x40], ecx
mov ecx, dword [ebx + 0x24]
push edi
push edx
push 0
mov eax, dword [ecx]
call dword [eax + 0x14]
mov ebx, eax
mov dword [esp + 0x20], ebx
test ebx, ebx
js 0x47486a
mov eax, dword [esp + 0x14]
push 0
push dword [eax + 0x6c]
push edi
push dword [esp + 0x44]
call fcn.00491bb0
mov edx, dword [esp + 0x38]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
cmp edi, dword [esp + 0x40]
jg 0x47478d
jl 0x4745a0
cmp edx, dword [esp + 0x18]
jae 0x47478d
jmp 0x4745a0
mov ebx, dword [esp + 0x40]
xor eax, eax
mov ecx, ebp
add ecx, edx
adc eax, edi
cmp eax, ebx
jl 0x4745dc
mov eax, dword [esp + 0x18]
jg 0x4745ba
cmp ecx, eax
jbe 0x4745dc
mov ebp, eax
mov eax, ebx
sub ebp, edx
sbb eax, edi
js 0x4745d0
jg 0x4745cb
cmp ebp, 0xffffffff
jbe 0x4745d0
or ebp, 0xffffffff
jmp 0x4745dc
test eax, eax
jg 0x4745dc
jl 0x4745da
test ebp, ebp
jae 0x4745dc
xor ebp, ebp
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x474609
mov eax, dword [ecx]
lea edx, [esp + 0x38]
push edx
push ecx
mov dword [esp + 0x40], 0
call dword [eax + 0x1c]
xor eax, eax
cmp word [esp + 0x38], ax
setne al
test eax, eax
jne 0x474856
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov ecx, dword [eax + 0x30]
mov edi, dword [eax + 0x40]
sub ecx, ebp
mov eax, dword [eax + 0x34]
sbb eax, 0
sub ecx, dword [esp + 0x10]
mov edx, dword [edi]
sbb eax, ebx
push eax
push ecx
push dword [esp + 0x58]
lea eax, [esp + 0x38]
push dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x28]
push 0
push ebp
push dword [eax + 0x44]
push ebx
push dword [esp + 0x34]
push edi
call dword [edx + 0xc]
cmp dword [esp + 0x30], 0
mov ebx, eax
mov dword [esp + 0x20], ebx
jl 0x474764
mov edi, dword [esp + 0x2c]
jg 0x474678
test edi, edi
je 0x474764
mov edx, dword [esp + 0x14]
lea esi, [esp + 0x38]
push esi
push edi
mov dword [esp + 0x40], 0
mov ecx, dword [edx + 0x24]
push dword [edx + 0x44]
mov eax, dword [ecx]
call dword [eax + 0x1c]
mov esi, dword [esp + 0x24]
test eax, eax
js 0x47477a
cmp dword [esp + 0x38], edi
jne 0x474775
test eax, eax
js 0x47477a
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x48]
add edx, ecx
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
adc edi, eax
mov dword [esp + 0x10], edx
add dword [esi], ecx
mov ecx, esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x1c], edi
adc dword [ecx + 4], eax
mov ecx, dword [esp + 0x54]
test ecx, ecx
je 0x47476c
mov eax, dword [ecx]
push edi
push edx
push ecx
call dword [eax + 0x14]
test eax, eax
jns 0x474768
mov ecx, eax
movzx edx, ax
shr eax, 0x19
and ecx, 0x1ff0000
test al, 1
je 0x474717
cmp edx, 0x4c7
sete al
test al, al
je 0x474768
jmp 0x474727
cmp ecx, 0x70000
jne 0x474768
cmp edx, 0x4c7
jne 0x474768
test ebx, ebx
jns 0x474856
mov eax, ebx
movzx edx, bx
mov ecx, ebx
shr eax, 0x19
and ecx, 0x1ff0000
test al, 1
je 0x474845
cmp ecx, 0x1ff0000
jne 0x474754
cmp edx, 0x26
jmp 0x474757
cmp edx, 0x1b
sete al
test al, al
je 0x474856
jmp 0x474768
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
test ebx, ebx
js 0x47478d
jmp 0x474585
mov eax, 0x82020011
mov edi, dword [esp + 0x1c]
test ebx, ebx
cmovs eax, ebx
mov ebx, eax
mov dword [esp + 0x20], ebx
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x48]
mov eax, dword [ecx]
or eax, dword [ecx + 4]
je 0x474860
mov eax, dword [esp + 0x14]
push 0
mov eax, dword [eax + 0x6c]
push eax
push edi
push edx
mov dword [esp + 0x58], eax
call fcn.00491bb0
mov ebp, eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], eax
cmp dword [esp + 0x10], ecx
jne 0x4747ec
cmp edi, eax
jne 0x4747ec
push 0
push dword [esp + 0x4c]
push 0
push ebp
call fcn.00491a50
cmp edx, dword [esp + 0x50]
jg 0x4747ec
jl 0x4747eb
cmp eax, dword [esp + 0x4c]
jae 0x4747ec
inc ebp
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x28], ebp
jae 0x474832
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x28]
mov ecx, dword [esi + 0x2c]
mov eax, ebx
shr eax, 4
mov edi, ebx
and edi, 0xf
inc ebx
add edi, edi
lea edx, [ecx + eax*4]
mov eax, 3
mov ecx, edi
shl eax, cl
not eax
and eax, dword [edx]
bts eax, edi
mov dword [edx], eax
cmp ebx, ebp
jb 0x474801
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x24
ret 0x20
cmp ecx, 0x70000
jne 0x474856
cmp edx, 0x26
je 0x474789
mov ebx, 0x821804c7
jmp 0x474785
test ebx, ebx
mov eax, 0x80070026
cmovns ebx, eax
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x24
ret 0x20