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

Disassembly:
push 0xffffffffffffffff
push 0x4993d1
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x4bc7dc]
xor eax, esp
mov dword [esp + 0x6c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bc7dc]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
mov edi, dword [esp + 0x94]
mov esi, ecx
lea ebp, [esi + 4]
xor ebx, ebx
mov dword [esp + 0x24], ebx
push ebp
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x8c], 1
mov eax, dword [esi + 0x20]
sub eax, dword [esi + 0x1c]
mov dword [esp + 0x1c], ebx
sar eax, 2
mov dword [esp + 0x20], ebx
test eax, eax
je 0x4766f8
lea ebx, [ebx]
mov ecx, dword [esi + 0x1c]
movzx edx, word [esp + 0x98]
mov edi, dword [ecx + ebx*4]
lea eax, [ecx + ebx*4]
mov dword [esp + 0x28], edx
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
push 0x47e3e0
mov ebp, eax
mov eax, dword [edi + 4]
push 6
push eax
lea ecx, [ebp + 9]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.00496aa7
add esp, 0x14
test eax, eax
jne 0x4766d0
mov eax, dword [esi + 0x20]
sub eax, dword [esi + 0x1c]
inc ebx
sar eax, 2
cmp ebx, eax
jb 0x476680
jmp 0x4766ee
mov ecx, dword [eax + 2]
mov eax, dword [eax + 8]
sub eax, ecx
lea edi, [ecx + ebp]
mov ecx, dword [esi + 0x1c]
mov edx, dword [ecx + ebx*4]
mov ecx, dword [edx + 8]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], eax
jne 0x476715
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
xor ebx, ebx
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], ebx
mov word [edi], ax
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
jmp 0x4768d3
mov ebx, 7
xor ebp, ebp
xor edx, edx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebp
mov word [esp + 0x2c], dx
mov byte [esp + 0x8c], 2
cmp ecx, 2
jne 0x476790
cdq
sub eax, edx
sar eax, 1
xor ecx, ecx
push eax
mov eax, edi
lea esi, [esp + 0x4c]
mov dword [esp + 0x60], ebx
mov dword [esp + 0x5c], ebp
mov word [esp + 0x4c], cx
call fcn.0040ca50
mov edi, esi
lea esi, [esp + 0x2c]
mov byte [esp + 0x8c], 3
call fcn.0040c180
mov byte [esp + 0x8c], 2
cmp dword [esp + 0x5c], 8
jb 0x476820
mov edx, dword [esp + 0x48]
push edx
call fcn.0047fe1e
add esp, 4
jmp 0x476820
cmp ecx, 1
jne 0x476820
lea esi, [esp + 0x64]
lea ecx, [esp + 0x1c]
call fcn.00476410
lea ecx, [esp + 0x48]
push ecx
mov bl, 4
mov ecx, eax
mov byte [esp + 0x90], bl
call fcn.0040bf70
add esp, 4
mov edi, eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x8c], 5
call fcn.0040c180
mov byte [esp + 0x8c], bl
cmp dword [esp + 0x5c], 8
jb 0x4767ec
mov edx, dword [esp + 0x48]
push edx
call fcn.0047fe1e
add esp, 4
xor eax, eax
mov byte [esp + 0x8c], 2
cmp dword [esp + 0x78], 0x10
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebp
mov word [esp + 0x48], ax
jb 0x47681b
mov ecx, dword [esp + 0x64]
push ecx
call fcn.0047fe1e
add esp, 4
mov ebx, 7
mov esi, dword [esp + 0x18]
xor edx, edx
lea eax, [esp + 0x2c]
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebp
mov word [esi], dx
lea edi, [edx + 8]
cmp esi, eax
je 0x476894
cmp dword [esi + 0x14], edi
jb 0x47684a
mov eax, dword [esi]
push eax
call fcn.0047fe1e
add esp, 4
xor ecx, ecx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebp
mov word [esi], cx
cmp dword [esp + 0x40], edi
jae 0x476874
mov edx, dword [esp + 0x3c]
lea eax, [edx + edx + 2]
push eax
lea ecx, [esp + 0x30]
push ecx
push esi
call fcn.00480030
add esp, 0xc
jmp 0x47687e
mov edx, dword [esp + 0x2c]
mov dword [esi], edx
mov dword [esp + 0x2c], ebp
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov byte [esp + 0x8c], 1
mov dword [esp + 0x24], 1
cmp dword [esp + 0x40], edi
jb 0x4768b7
mov edx, dword [esp + 0x2c]
push edx
call fcn.0047fe1e
add esp, 4
mov ecx, dword [esp + 0x14]
xor eax, eax
push ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebp
mov word [esp + 0x30], ax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [esp + 0x84]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.0047fe29
add esp, 0x7c
ret 8