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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x7cdffc]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
mov esi, ecx
push edi
movsx edi, word [esi + 0x4c]
mov eax, dword [esi]
mov dword [esp + 0xc], eax
mov dword [esp + 0x24], edi
mov ecx, dword [esi + edi*4 + 0x78]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
mov ax, word [esi + edi*2 + 0x4e]
cmp ax, word [ecx + 0x12]
jae 0x4cdab9
cmp byte [esi + 0x49], 1
jne 0x4cdab9
movzx edx, ax
mov eax, dword [ecx + 0x40]
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], ecx
movzx ebx, byte [eax + edx*2]
movzx eax, byte [eax + edx*2 + 1]
shl ebx, 8
or ebx, eax
movzx eax, word [ecx + 0x14]
and ebx, eax
add ebx, dword [ecx + 0x38]
cmp byte [ecx + 5], 0
jne 0x4cd8f4
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0
push eax
push esi
call fcn.004ca5f0
add esp, 8
test eax, eax
jne 0x4cdabe
mov edx, dword [esi + 0x3c]
mov ecx, dword [esp + 0x14]
push esi
call fcn.004c5e30
add esp, 4
test eax, eax
jne 0x4cdabe
cmp dword [esi + 0x10], eax
jne 0x4cd940
mov eax, dword [esp + 0xc]
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
mov eax, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x4cd940
test byte [eax + 0x48], 0x10
je 0x4cd939
cmp dword [eax + 0x18], ecx
jne 0x4cd939
cmp dword [eax + 0x1c], edx
jne 0x4cd939
mov byte [eax + 0x49], 0
mov eax, dword [eax + 8]
test eax, eax
jne 0x4cd925
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x44]
mov ecx, dword [edx + 0x10]
mov eax, dword [ecx + 0x94]
cmp eax, dword [ecx + 0x98]
mov ecx, edx
jbe 0x4cd961
call fcn.004c2570
jmp 0x4cd966
call fcn.004c2390
test eax, eax
jne 0x4cdabe
lea eax, [esp + 0xc]
mov edx, ebx
mov ebx, dword [esp + 0x10]
mov ecx, ebx
push eax
call fcn.004cb2b0
mov edx, dword [esp + 0x1c]
add esp, 4
mov dword [esp + 0x28], eax
mov ecx, ebx
lea eax, [esp + 0x28]
push eax
movzx eax, word [esp + 0x10]
push eax
call fcn.004cb860
mov eax, dword [esp + 0x30]
add esp, 8
test eax, eax
jne 0x4cdabe
cmp byte [ebx + 5], al
jne 0x4cda5b
movsx eax, word [esi + 0x4c]
mov ebx, dword [esi + eax*4 + 0x78]
mov eax, dword [esi + edi*4 + 0x7c]
mov dword [esp + 0xc], ebx
movzx ecx, word [ebx + 0x12]
mov eax, dword [eax + 0x48]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x40]
movzx edx, byte [eax + ecx*2 - 2]
movzx eax, byte [eax + ecx*2 - 1]
mov ecx, ebx
shl edx, 8
or edx, eax
movzx eax, word [ebx + 0x14]
and edx, eax
add edx, dword [ebx + 0x38]
mov dword [esp + 0x20], edx
call fcn.004c64d0
mov ecx, dword [esp + 0xc]
movzx ebx, ax
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx + 0x44]
mov edi, dword [eax + 0x50]
call fcn.004c2750
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x20]
lea eax, [ebx + 4]
push edi
push eax
mov eax, dword [esp + 0x30]
add eax, 0xfffffffc
push eax
call fcn.004cb990
add esp, 0x14
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x10]
mov ecx, eax
push ebx
movzx edx, word [eax + 0x12]
dec edx
call fcn.004cb860
mov eax, dword [esp + 0x30]
add esp, 8
test eax, eax
jne 0x4cdabe
mov edi, dword [esp + 0x24]
mov ecx, esi
call fcn.004cd490
mov ebx, eax
test ebx, ebx
jne 0x4cdaa5
movsx ecx, word [esi + 0x4c]
cmp ecx, edi
jle 0x4cda9e
movzx ecx, word [esi + 0x4c]
movsx eax, cx
mov edx, dword [esi + eax*4 + 0x78]
lea eax, [ecx - 1]
mov ecx, edx
mov word [esi + 0x4c], ax
call fcn.004c7130
movsx eax, word [esi + 0x4c]
cmp eax, edi
jg 0x4cda70
mov ecx, esi
call fcn.004cd490
mov ebx, eax
test ebx, ebx
jne 0x4cdaa5
mov ecx, esi
call fcn.004c9c30
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.006a7b19
mov esp, ebp
pop ebp
ret
mov eax, 1
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.006a7b19
mov esp, ebp
pop ebp
ret