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

Disassembly:
sub esp, 0x168
mov eax, dword [esp + 0x174]
push ebx
mov ebx, dword [eax + 0x510]
push ebp
mov ebp, dword [eax + 0x504]
push esi
mov esi, dword [esp + 0x17c]
mov eax, dword [esi + 0x40]
mov ecx, dword [eax + 4]
mov eax, dword [ecx + 0x1c]
mov edx, dword [eax + 0xb20]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x184]
mov dword [esp + 0x18], ebx
mov dword [esp + 0xc], ebp
mov dword [esp + 0x2c], eax
test edx, edx
je 0x4c7e2c
push edi
xor edi, edi
test ebp, ebp
jle 0x4c79fa
jmp 0x4c79a0
mov esi, dword [edx + edi*4]
mov eax, dword [ebx + 0x340]
mov ecx, esi
dec eax
and ecx, 0x7fff
cmp eax, 3
ja case.default.0x4c79b7
jmp dword [eax*4 + 0x4c7e70]
sar ecx, 2
jmp case.default.0x4c79b7
sar ecx, 3
jmp case.default.0x4c79b7
mov ebp, dword [esp + 0x10]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x188]
mov ecx, eax
jmp case.default.0x4c79b7
sar ecx, 4
and esi, 0x8000
or esi, ecx
mov dword [edx + edi*4], esi
inc edi
cmp edi, ebp
jl 0x4c79a0
cmp ebp, 2
mov ecx, dword [edx]
mov eax, dword [edx + 4]
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], eax
jle 0x4c7b1e
mov eax, dword [esp + 0x184]
lea ecx, [esp + 0x74]
sub ecx, edx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
add ebx, 0x34c
add eax, 0x30c
add ecx, 0xfffffffe
lea ebp, [edx + 8]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
jmp 0x4c7a48
mov eax, dword [esp + 0x18]
mov ebx, dword [eax + 0xfc]
mov esi, dword [eax]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + esi*4 + 0x344]
mov edx, dword [esp + 0x188]
mov eax, dword [eax + ebx*4 + 0x344]
mov edi, dword [edx + ebx*4]
push ecx
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx]
push eax
mov eax, dword [edx + esi*4]
mov edx, edi
call fcn.004c6b80
mov ecx, dword [ebp]
add esp, 8
test ecx, 0x8000
jne 0x4c7aed
cmp eax, ecx
je 0x4c7aed
mov edx, dword [esp + 0x184]
mov edx, dword [edx + 0x50c]
sub edx, eax
cmp edx, eax
jl 0x4c7aa5
mov edx, eax
sub ecx, eax
jns 0x4c7ac3
mov eax, edx
neg eax
cmp ecx, eax
jge 0x4c7ab8
sub edx, ecx
dec edx
mov ecx, edx
jmp 0x4c7acd
add ecx, ecx
or edx, 0xffffffff
sub edx, ecx
mov ecx, edx
jmp 0x4c7acd
cmp ecx, edx
jl 0x4c7acb
add ecx, edx
jmp 0x4c7acd
add ecx, ecx
mov eax, dword [esp + 0x20]
mov dword [eax + ebp], ecx
mov eax, dword [esp + 0x188]
and edi, 0x7fff
mov dword [eax + ebx*4], edi
and dword [eax + esi*4], 0x7fff
jmp 0x4c7b00
mov ecx, dword [esp + 0x20]
or eax, 0x8000
mov dword [ebp], eax
mov dword [ecx + ebp], 0
mov eax, 4
add dword [esp + 0x18], eax
add dword [esp + 0x14], eax
add ebp, eax
sub dword [esp + 0x10], 1
jne 0x4c7a44
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x17c]
push 1
push 1
push edi
call fcn.004c9590
mov esi, dword [esp + 0x190]
mov ecx, dword [esi + 0x50c]
inc dword [esi + 0x51c]
dec ecx
call fcn.004c6520
push eax
lea edx, [eax + eax]
mov eax, dword [esp + 0x84]
add dword [esi + 0x518], edx
push eax
push edi
call fcn.004c9590
mov ecx, dword [esi + 0x50c]
dec ecx
call fcn.004c6520
mov ecx, dword [esp + 0x90]
push eax
push ecx
push edi
call fcn.004c9590
add esp, 0x24
cmp dword [ebx], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x14], 2
jle 0x4c7d4a
lea edx, [ebx + 4]
mov dword [esp + 0x10], edx
mov edi, edi
mov eax, dword [esp + 0x10]
mov edi, dword [eax]
mov ecx, dword [ebx + edi*4 + 0x80]
mov ebp, dword [ebx + edi*4 + 0xc0]
mov dword [esp + 0x18], ecx
mov ecx, ebp
mov esi, 1
shl esi, cl
xor ecx, ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
cmp ebp, ecx
je 0x4c7cc2
xor eax, eax
cmp esi, ecx
jle 0x4c7c35
lea edx, [edi + 0xa]
shl edx, 5
add edx, ebx
mov edi, dword [edx]
cmp edi, ecx
jge 0x4c7c15
mov dword [esp + eax*4 + 0x54], 1
jmp 0x4c7c29
mov ecx, dword [esp + 0x30]
mov ecx, dword [ecx + edi*4 + 0x720]
mov ecx, dword [ecx + 4]
mov dword [esp + eax*4 + 0x54], ecx
xor ecx, ecx
inc eax
add edx, 4
cmp eax, esi
jl 0x4c7c05
mov edi, dword [esp + 0x1c]
xor edx, edx
cmp dword [esp + 0x18], ecx
jle 0x4c7c8f
mov eax, dword [esp + 0x14]
lea eax, [esp + eax*4 + 0x74]
mov dword [esp + 0x1c], eax
jmp 0x4c7c52
xor ecx, ecx
xor eax, eax
cmp esi, ecx
jle 0x4c7c71
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx]
mov edi, edi
cmp ecx, dword [esp + eax*4 + 0x54]
jl 0x4c7c6d
inc eax
cmp eax, esi
jl 0x4c7c60
jmp 0x4c7c71
mov dword [esp + edx*4 + 0x34], eax
mov eax, dword [esp + edx*4 + 0x34]
mov ecx, dword [esp + 0x24]
add dword [esp + 0x24], ebp
add dword [esp + 0x1c], 4
shl eax, cl
inc edx
or dword [esp + 0x20], eax
cmp edx, dword [esp + 0x18]
jl 0x4c7c50
mov eax, dword [ebx + edi*4 + 0x100]
mov ecx, dword [esp + 0x17c]
imul eax, eax, 0x2c
mov edx, dword [esp + 0x20]
add eax, dword [esp + 0x28]
push ecx
push edx
push eax
call fcn.004bfa10
mov ebp, dword [esp + 0x190]
add esp, 0xc
add dword [ebp + 0x514], eax
jmp 0x4c7cc9
mov ebp, dword [esp + 0x184]
xor esi, esi
cmp dword [esp + 0x18], esi
jle 0x4c7d25
lea ecx, [edi*8 + 0x50]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x20], ecx
lea edi, [esp + edi*4 + 0x74]
mov edx, dword [esp + esi*4 + 0x34]
add edx, dword [esp + 0x20]
mov eax, dword [ebx + edx*4]
test eax, eax
jl 0x4c7d1b
mov edx, dword [esp + 0x28]
imul eax, eax, 0x2c
mov ecx, dword [edi]
add eax, edx
cmp ecx, dword [eax + 4]
jge 0x4c7d1b
mov edx, dword [esp + 0x17c]
push edx
push ecx
push eax
call fcn.004bfa10
add esp, 0xc
add dword [ebp + 0x518], eax
inc esi
add edi, 4
cmp esi, dword [esp + 0x18]
jl 0x4c7ce4
mov eax, dword [esp + 0x18]
add dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
add dword [esp + 0x10], 4
inc eax
cmp eax, dword [ebx]
mov dword [esp + 0x2c], eax
jl 0x4c7ba0
mov esi, dword [esp + 0x184]
mov ecx, dword [ebx + 0x340]
mov edx, dword [esp + 0x188]
imul ecx, dword [edx]
mov eax, 1
xor edi, edi
xor ebp, ebp
cmp dword [esi + 0x504], eax
mov dword [esp + 0x14], eax
jle 0x4c7de0
add esi, 0x108
mov dword [esp + 0x10], esi
lea esp, [esp]
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
mov eax, dword [esp + 0x188]
mov esi, dword [eax + edx*4]
mov eax, esi
and eax, 0x7fff
cmp eax, esi
jne 0x4c7dc3
mov esi, dword [ebx + 0x340]
mov edi, dword [ebx + edx*4 + 0x344]
imul esi, eax
mov edx, dword [esp + 0x18c]
push edx
push edi
push ebp
mov eax, esi
call fcn.004c6d80
add esp, 0xc
mov ebp, edi
mov ecx, esi
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x184]
add dword [esp + 0x10], 4
inc eax
cmp eax, dword [edx + 0x504]
mov dword [esp + 0x14], eax
jl 0x4c7d80
mov ebx, dword [esp + 0x180]
mov eax, dword [ebx + 0x24]
cdq
sub eax, edx
sar eax, 1
mov esi, edi
cmp edi, eax
pop edi
jge 0x4c7e17
jmp 0x4c7e00
mov eax, dword [esp + 0x188]
mov dword [eax + esi*4], ecx
mov eax, dword [ebx + 0x24]
cdq
sub eax, edx
inc esi
sar eax, 1
cmp esi, eax
jl 0x4c7e00
pop esi
mov eax, 1
add dword [0x5b84cc], eax
pop ebp
pop ebx
add esp, 0x168
ret
mov ecx, dword [esp + 0x178]
push 1
push 0
push ecx
call fcn.004c9590
mov eax, dword [esi + 0x24]
cdq
sub eax, edx
mov edx, dword [esp + 0x194]
sar eax, 1
add eax, eax
add eax, eax
push eax
push 0
push edx
call fcn.0049e7a0
inc dword [0x5b84cc]
add esp, 0x18
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x168
ret