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

Disassembly:
sub esp, 0x14
mov eax, dword [0x502c60]
xor eax, esp
mov dword [esp + 0x10], eax
push ebx
push ebp
push esi
mov ebx, ecx
mov eax, 0x88888889
mov esi, dword [ebx + 0x18]
sub esi, dword [ebx + 0x14]
push edi
lea edi, [ebx + 0x14]
imul esi
add edx, esi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x4c9c3e
mov eax, dword [ebx]
mov dword [esp + 0x1c], 2
mov ebp, dword [eax + 0x2dc]
mov ecx, dword [eax + 0x2c8]
sub ecx, dword [eax + 0x2c4]
sub ebp, dword [eax + 0x2d8]
mov eax, 0x2aaaaaab
imul ecx
sar ebp, 7
lea ecx, [esp + 0x1c]
sar edx, 1
mov eax, edx
mov dword [esp + 0x18], ebp
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x14], eax
lea eax, [ebp + 0x1f]
cdq
idiv ebp
lea edx, [esp + 0x10]
cmp eax, 2
mov dword [esp + 0x10], eax
push ebp
cmovge ecx, edx
mov eax, dword [ecx]
lea ecx, [ebx + 8]
mov dword [esp + 0x20], eax
add eax, 6
mov dword [ebx + 4], eax
call fcn.004ca000
mov ecx, dword [ebx + 0xc]
mov eax, 0x88888889
sub ecx, dword [ebx + 8]
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jle 0x4c9a44
xor ebp, ebp
xor edi, edi
mov eax, dword [ebx]
lea ebp, [ebp + 0x3c]
mov ecx, dword [ebx + 8]
inc edi
mov eax, dword [eax + 0x2f8]
mov dword [ecx + ebp - 0x30], eax
mov eax, 0x88888889
mov ecx, dword [ebx + 0xc]
sub ecx, dword [ebx + 8]
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jl 0x4c9a11
lea edi, [ebx + 0x14]
push dword [esp + 0x14]
lea ebp, [ebx + 0x20]
mov ecx, ebp
call fcn.004c9fa0
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x4c9aa7
xor ebp, ebp
mov dword [esp + 0x10], eax
xor edi, edi
mov eax, dword [ebx]
lea ebp, [ebp + 0x3c]
mov edx, dword [eax + 0x2d8]
mov eax, dword [ebx + 8]
add edx, edi
sub edi, 0xffffff80
mov ecx, dword [edx + 0x18]
mov dword [eax + ebp - 8], ecx
mov dword [eax + ebp - 0x3c], 1
mov eax, dword [ebx + 8]
mov dword [eax + ebp - 0x34], edx
mov eax, dword [ebx + 0x20]
mov ecx, dword [edx + 0x24]
lea ecx, [eax + ecx*2]
mov ax, word [ebx + 4]
add word [ecx], ax
dec dword [esp + 0x10]
jne 0x4c9a62
lea edi, [ebx + 0x14]
lea ebp, [ebx + 0x20]
xor edx, edx
xor esi, esi
cmp dword [esp + 0x14], edx
jle 0x4c9acb
mov edi, dword [esp + 0x14]
mov eax, dword [ebp]
lea ecx, [eax + edx*2]
inc edx
movzx eax, word [ecx]
add esi, eax
mov word [ecx], si
cmp edx, edi
jl 0x4c9ab5
lea edi, [ebx + 0x14]
push esi
mov ecx, edi
call fcn.004ca000
cmp dword [esp + 0x18], 0
jle 0x4c9be9
mov ecx, dword [esp + 0x1c]
xor edx, edx
shl ecx, 4
xor eax, eax
sub ecx, dword [esp + 0x1c]
shl ecx, 2
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
jmp 0x4c9b00
mov ecx, dword [ebx]
xor esi, esi
mov ebp, dword [ecx + 0x2d8]
add ebp, edx
cmp dword [ebx + 4], esi
jle 0x4c9b22
mov edx, eax
mov ecx, dword [edi]
lea edx, [edx + 0x3c]
inc esi
mov dword [edx + ecx - 0x34], ebp
cmp esi, dword [ebx + 4]
jl 0x4c9b13
mov edx, dword [ebp + 0x18]
mov ecx, edx
and ecx, 0x30000000
cmp ecx, 0x20000000
je 0x4c9b3b
and edx, 0xffffc000
mov ecx, dword [edi]
and edx, 0xffbfffff
mov dword [ecx + eax], 6
mov dword [ecx + eax + 0x34], edx
mov ecx, dword [edi]
mov dword [ecx + eax + 0x3c], 2
mov dword [ecx + eax + 0x70], edx
mov ecx, dword [edi]
mov dword [ecx + eax + 0x78], 3
mov dword [ecx + eax + 0xac], edx
mov ecx, dword [edi]
mov dword [ecx + eax + 0xb4], 7
mov dword [ecx + eax + 0xe8], edx
mov ecx, dword [edi]
mov dword [ecx + eax + 0xf0], 5
mov dword [ecx + eax + 0x124], edx
mov ecx, dword [edi]
mov dword [ecx + eax + 0x12c], 1
mov dword [ecx + eax + 0x160], edx
add eax, 0x168
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jle 0x4c9bd4
mov esi, eax
mov ebp, ecx
add eax, dword [esp + 0x14]
mov edi, edi
mov ecx, dword [edi]
lea esi, [esi + 0x3c]
mov dword [ecx + esi - 0x3c], 1
mov dword [ecx + esi - 8], edx
dec ebp
jne 0x4c9bc0
mov edx, dword [esp + 0x10]
sub edx, 0xffffff80
dec dword [esp + 0x18]
mov dword [esp + 0x10], edx
jne 0x4c9b00
mov ecx, dword [edi + 4]
mov eax, 0x88888889
sub ecx, dword [edi]
xor ebp, ebp
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jle 0x4c9c3e
xor esi, esi
lea esp, [esp]
mov eax, dword [ebx]
lea esi, [esi + 0x3c]
mov ecx, dword [edi]
inc ebp
mov eax, dword [eax + 0x2f8]
mov dword [esi + ecx - 0x30], eax
mov eax, 0x88888889
mov ecx, dword [edi + 4]
sub ecx, dword [edi]
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
jl 0x4c9c10
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004d17f4
add esp, 0x14
ret