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

Disassembly:
sub esp, 0x144
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov byte [esp + 0x27], 0
mov eax, dword [esi + 0x84]
mov ebp, dword [esi + 0x910]
mov cx, word [esi + 0x914]
sub eax, ebp
mov dword [esp + 0x48], eax
cdq
sub eax, edx
sar eax, 1
test cx, cx
je 0x4c7161
cmp word [esi + 0x12a], cx
jne 0x4c7161
mov bl, 1
jmp 0x4c718c
xor bl, bl
xor ecx, ecx
test eax, eax
jl 0x4c717a
mov edx, dword [esi + 0x950]
cmp byte [edx + ecx], 0xff
je 0x4c71c4
inc ecx
cmp ecx, eax
jle 0x4c716f
mov ecx, dword [esi + 0x950]
movzx dx, byte [ecx + eax]
mov word [esi + 0x128], dx
xor ecx, ecx
mov cx, word [esi + 0x12a]
mov ecx, dword [ecx*4 + 0x6a8768]
test ecx, ecx
mov dword [esp + 0x28], ecx
je 0x4c7b30
test bl, bl
mov dword [esp + 0x44], 0
je 0x4c72c4
movsx ebp, word [esi + 0x128]
jmp 0x4c72c6
mov eax, dword [esi + 0xe0c]
mov edi, dword [esi + 0x958]
test edi, edi
mov byte [eax + 1], 0
mov byte [eax + 0x21], 0
mov byte [eax + 0x11], 0
mov byte [eax + 0x31], 0
mov byte [eax + 0x101], 0
mov byte [eax + 0x111], 0
mov byte [eax + 0x121], 0
mov byte [eax + 0x131], 0
mov byte [eax + 0xa1], 0
mov byte [eax + 0x91], 0
mov byte [eax + 0xb1], 0
mov dword [esi + 0x954], 0
mov byte [esi + 0x1c1], 0
mov byte [esi + 0x1e1], 0
mov byte [esi + 0x1d1], 0
mov byte [esi + 0x1f1], 0
mov byte [esi + 0x2c1], 0
mov byte [esi + 0x2d1], 0
mov byte [esi + 0x2e1], 0
mov byte [esi + 0x2f1], 0
mov byte [esi + 0x261], 0
mov byte [esi + 0x251], 0
mov byte [esi + 0x271], 0
mov byte [eax + 0x81], 0
mov byte [esi + 0x241], 0
mov byte [esi + 0x94d], 0
je 0x4c72b7
push str.exit_frame_incorrectly_defined
push 0
call fcn.004015b0
mov di, word [edi]
xor eax, eax
mov ax, word [esi + 0x90c]
add esp, 8
mov ecx, esi
push eax
push edi
call fcn.004c87d0
mov eax, edi
pop edi
pop esi
pop ebp
and eax, 0xffff
pop ebx
add esp, 0x144
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x144
ret
mov ebp, eax
xor edx, edx
xor cl, cl
mov dx, word [esi + 0x916]
mov dword [esp + 0x30], ebp
cmp edx, ebp
mov byte [esp + 0x2f], cl
mov byte [esp + 0x13], cl
jg 0x4c736f
mov ebx, 3
mov edi, 4
mov eax, dword [esp + 0x28]
mov al, byte [edx + eax]
cmp al, 0xff
je 0x4c79f7
cmp al, 0x80
je 0x4c7355
cmp al, 0x84
je 0x4c7355
cmp al, 0x81
je 0x4c7347
cmp al, 0x85
je 0x4c7347
cmp al, 0x82
je 0x4c733d
cmp al, 0x86
je 0x4c733d
cmp al, 0x83
je 0x4c7333
cmp al, 0x87
je 0x4c7333
mov ebp, dword [esp + 0x44]
xor cl, cl
movsx eax, al
add ebp, eax
mov dword [esp + 0x44], ebp
mov ebp, dword [esp + 0x30]
jmp 0x4c7366
mov cl, 1
mov dword [esp + 0x34], edi
cmp al, 0x87
jmp 0x4c7361
mov cl, 1
mov dword [esp + 0x34], ebx
cmp al, 0x86
jmp 0x4c7361
mov cl, 1
mov dword [esp + 0x34], 2
cmp al, 0x85
jmp 0x4c7361
mov cl, 1
mov dword [esp + 0x34], 1
cmp al, 0x84
setne byte [esp + 0x13]
inc edx
cmp edx, ebp
jle 0x4c72ef
mov byte [esp + 0x2f], cl
inc ebp
mov word [esi + 0x916], bp
test cl, cl
jne 0x4c7387
mov eax, dword [esp + 0x44]
test eax, eax
je 0x4c7b30
push 0x5564e4
mov ecx, esi
call fcn.00460e80
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 8]
mov eax, dword [esi + 0xc]
mov dword [esp + 0x40], ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x38], edx
lea edi, [esi + 0xc6c]
push ecx
lea edx, [esp + 0x1c]
add eax, 0x20000
push edi
push edx
mov byte [esp + 0x33], 1
mov dword [esp + 0x48], eax
mov dword [esp + 0x34], 0x20
call fcn.004e77a0
mov ecx, dword [eax]
mov dword [esp + 0x58], ecx
lea ecx, [esp + 0x58]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x60], edx
lea edx, [esp + 0x48]
mov eax, dword [eax + 8]
push edx
mov dword [esp + 0x68], eax
lea eax, [esp + 0x2c]
push eax
call fcn.004e7760
mov ecx, dword [eax]
push 0x800
mov dword [esp + 0xc0], ecx
mov ecx, dword [0x56e990]
mov edx, dword [eax + 4]
push 0
mov dword [esp + 0xc8], edx
lea edx, [esp + 0x6c]
mov eax, dword [eax + 8]
push ecx
mov dword [esp + 0xd0], eax
lea eax, [esp + 0xc8]
push edx
lea ecx, [esp + 0x60]
push eax
push ecx
call fcn.00452c30
add esp, 0x30
test eax, eax
jne 0x4c7b30
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], eax
mov dword [esp + 0x11c], eax
mov dword [esp + 0x120], eax
mov dword [esp + 0x124], eax
mov word [esp + 0x128], ax
mov word [esp + 0x12a], ax
mov word [esp + 0x12c], ax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xb0], edx
lea edx, [esp + 0x28]
mov dword [esp + 0xb4], eax
push edx
lea eax, [esp + 0x1c]
mov ebx, 0x80
push edi
push eax
mov dword [esp + 0xc4], ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], 0x20
lea ebp, [esi + 0xc78]
call fcn.004e77a0
add esp, 0xc
lea ecx, [esp + 0x30]
lea edx, [esp + 0x70]
push eax
push ecx
push ebp
push edx
call fcn.004e77a0
push eax
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x90]
push eax
push ecx
call fcn.004e7760
add esp, 0x18
lea edx, [esp + 0x68]
push eax
push edx
call fcn.004e7760
mov eax, dword [eax]
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x74]
push edi
push edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], 0x20
call fcn.004e77a0
add esp, 0x18
lea ecx, [esp + 0x7c]
push eax
lea eax, [esp + 0x34]
push eax
push ebp
push ecx
call fcn.004e77a0
push eax
lea edx, [esp + 0x4c]
lea eax, [esp + 0x84]
push edx
push eax
call fcn.004e7760
add esp, 0x18
lea ecx, [esp + 0x5c]
push eax
push ecx
call fcn.004e7760
mov edx, dword [eax + 4]
mov dword [esp + 0x20], edx
lea eax, [esp + 0x34]
lea ecx, [esp + 0x64]
push eax
push edi
push ecx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], 0x20
call fcn.004e77a0
add esp, 0x18
lea edx, [esp + 0x30]
push eax
push edx
lea eax, [esp + 0x6c]
push ebp
push eax
call fcn.004e77a0
lea ecx, [esp + 0x48]
push eax
lea edx, [esp + 0x90]
push ecx
push edx
call fcn.004e7760
add esp, 0x18
push eax
lea eax, [esp + 0x78]
push eax
call fcn.004e7760
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov dword [esp + 0xd0], eax
lea eax, [esp + 0xbc]
mov dword [esp + 0xc8], ecx
push eax
mov dword [esp + 0xd0], edx
call fcn.004524c0
lea ecx, [esp + 0xc0]
push 1
push ecx
call fcn.004549a0
mov eax, dword [esp + 0x130]
add esp, 0x18
test eax, eax
jne 0x4c7b30
lea edx, [esp + 0x14]
lea eax, [esp + 0x58]
push edx
push edi
push eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 0x20
call fcn.004e77a0
add esp, 0xc
lea ecx, [esp + 0x18]
lea edx, [esp + 0x64]
push eax
push ecx
push ebp
push edx
call fcn.004e77a0
push eax
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x90]
push eax
push ecx
call fcn.004e7720
add esp, 0x18
lea edx, [esp + 0x74]
push eax
push edx
call fcn.004e7760
mov eax, dword [eax]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x68]
push edi
push edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 0x20
call fcn.004e77a0
add esp, 0x18
lea ecx, [esp + 0x64]
push eax
lea eax, [esp + 0x1c]
push eax
push ebp
push ecx
call fcn.004e77a0
push eax
lea edx, [esp + 0x4c]
lea eax, [esp + 0x90]
push edx
push eax
call fcn.004e7720
add esp, 0x18
lea ecx, [esp + 0x74]
push eax
push ecx
call fcn.004e7760
mov edx, dword [eax + 4]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x68]
push edi
push ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 0x20
call fcn.004e77a0
add esp, 0x18
lea edx, [esp + 0x18]
push eax
push edx
lea eax, [esp + 0x6c]
push ebp
push eax
call fcn.004e77a0
lea ecx, [esp + 0x48]
push eax
lea edx, [esp + 0x90]
push ecx
push edx
call fcn.004e7720
add esp, 0x18
push eax
lea eax, [esp + 0x78]
push eax
call fcn.004e7760
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0xd0], eax
lea eax, [esp + 0xbc]
mov dword [esp + 0xc8], ecx
push eax
mov dword [esp + 0xd0], edx
call fcn.004524c0
lea ecx, [esp + 0xc0]
push 1
push ecx
call fcn.004549a0
mov eax, dword [esp + 0x130]
add esp, 0x18
test eax, eax
jne 0x4c7b30
lea edx, [esp + 0x14]
lea ebp, [esi + 0xc84]
push edx
lea eax, [esp + 0x5c]
push ebp
push eax
mov dword [esp + 0x20], 0x40
call fcn.004e77a0
lea ecx, [esp + 0x44]
push eax
lea edx, [esp + 0x74]
push ecx
push edx
call fcn.004e7720
mov eax, dword [eax]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x74]
push ebp
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], 0x40
call fcn.004e77a0
push eax
lea eax, [esp + 0x60]
lea ecx, [esp + 0x8c]
push eax
push ecx
call fcn.004e7720
mov edx, dword [eax + 4]
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x8c]
push ebp
push ecx
mov dword [esp + 0x64], edx
mov dword [esp + 0x50], 0x40
call fcn.004e77a0
push eax
lea edx, [esp + 0x78]
lea eax, [esp + 0xa4]
push edx
push eax
call fcn.004e7720
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x70]
add esp, 0x48
mov dword [esp + 0xb8], eax
lea eax, [esp + 0x14]
mov dword [esp + 0xb0], ecx
push eax
lea ecx, [esp + 0x5c]
push edi
push ecx
mov dword [esp + 0xc0], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 0x40
call fcn.004e77a0
add esp, 0xc
lea edx, [esp + 0x18]
push eax
push edx
lea eax, [esp + 0x6c]
push ebp
push eax
call fcn.004e77a0
lea ecx, [esp + 0x48]
push eax
lea edx, [esp + 0x90]
push ecx
push edx
call fcn.004e7720
add esp, 0x18
push eax
lea eax, [esp + 0x78]
push eax
call fcn.004e7760
mov ecx, dword [eax]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x34], ecx
lea edx, [esp + 0x20]
lea eax, [esp + 0x64]
push edx
push edi
push eax
mov dword [esp + 0x30], 0x40
call fcn.004e77a0
add esp, 0x18
lea ecx, [esp + 0x18]
lea edx, [esp + 0x64]
push eax
push ecx
push ebp
push edx
call fcn.004e77a0
push eax
lea eax, [esp + 0x4c]
lea ecx, [esp + 0x90]
push eax
push ecx
call fcn.004e7720
add esp, 0x18
lea edx, [esp + 0x74]
push eax
push edx
call fcn.004e7760
mov eax, dword [eax + 4]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x68]
push edi
push edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], 0x40
call fcn.004e77a0
add esp, 0x18
lea ecx, [esp + 0x64]
push eax
lea eax, [esp + 0x1c]
push eax
push ebp
push ecx
call fcn.004e77a0
push eax
lea edx, [esp + 0x4c]
lea eax, [esp + 0x90]
push edx
push eax
call fcn.004e7720
add esp, 0x18
lea ecx, [esp + 0x74]
push eax
push ecx
call fcn.004e7760
mov edx, dword [esp + 0x34]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xc8], edx
lea edx, [esp + 0xbc]
mov dword [esp + 0xcc], ecx
push edx
mov dword [esp + 0xd4], eax
call fcn.004524c0
lea eax, [esp + 0xc0]
push 1
push eax
call fcn.004549a0
mov eax, dword [esp + 0x130]
add esp, 0x18
test eax, eax
jne 0x4c7b30
mov al, byte [esp + 0x2f]
test al, al
je 0x4c7b14
mov eax, dword [esp + 0x34]
xor edi, edi
cmp eax, 1
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
jne 0x4c7a07
push 6
lea ecx, [esp + 0x1c]
push esi
push ecx
call fcn.00453d60
mov eax, dword [esi + 0x924]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esi + 0x91c]
mov ebx, dword [esp + 0x24]
sub ecx, eax
mov al, byte [esp + 0x1f]
add esp, 0xc
sub ebx, edx
test al, al
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ecx
je 0x4c7b09
mov ecx, dword [esi + 0x920]
mov eax, dword [esp + 0x1c]
sub eax, ecx
lea edx, [esp + 0x18]
mov dword [esp + 0x1c], eax
push edx
jmp 0x4c7b28
mov byte [esp + 0x2f], cl
mov word [esi + 0x916], dx
jmp 0x4c7377
cmp eax, 2
jne 0x4c7a62
push 5
lea edx, [esp + 0x1c]
push esi
push edx
call fcn.00453d60
mov eax, dword [esi + 0x928]
mov ebx, dword [esp + 0x24]
mov ecx, dword [esi + 0x930]
mov edx, dword [esp + 0x2c]
sub ebx, eax
mov al, byte [esp + 0x1f]
add esp, 0xc
sub edx, ecx
test al, al
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], edx
je 0x4c7b09
mov edx, dword [esi + 0x92c]
mov eax, dword [esp + 0x1c]
sub eax, edx
lea edx, [esp + 0x18]
mov dword [esp + 0x1c], eax
push edx
jmp 0x4c7b28
cmp eax, 3
jne 0x4c7ab6
push 1
lea eax, [esp + 0x1c]
push esi
push eax
call fcn.00453d60
mov ecx, dword [esi + 0x934]
mov edx, dword [esp + 0x24]
mov al, byte [esp + 0x1f]
sub edx, ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x24], edx
mov edx, dword [esi + 0x93c]
add esp, 0xc
sub ecx, edx
test al, al
mov dword [esp + 0x20], ecx
je 0x4c7b09
mov eax, dword [esi + 0x938]
mov ecx, dword [esp + 0x1c]
sub ecx, eax
lea edx, [esp + 0x18]
mov dword [esp + 0x1c], ecx
push edx
jmp 0x4c7b28
cmp eax, 4
jne 0x4c7b0d
push edi
lea ecx, [esp + 0x1c]
push esi
push ecx
call fcn.00453d60
mov eax, dword [esi + 0x948]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esi + 0x940]
mov ebx, dword [esp + 0x24]
sub ecx, eax
mov al, byte [esp + 0x1f]
add esp, 0xc
sub ebx, edx
test al, al
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ecx
je 0x4c7b09
mov ecx, dword [esi + 0x944]
mov eax, dword [esp + 0x1c]
sub eax, ecx
lea edx, [esp + 0x18]
mov dword [esp + 0x1c], eax
push edx
jmp 0x4c7b28
mov dword [esp + 0x1c], edi
lea edx, [esp + 0x18]
push edx
jmp 0x4c7b28
lea eax, [esp + 0x44]
lea ecx, [esp + 0x58]
push eax
push edi
push ecx
call fcn.004e77a0
add esp, 0xc
push eax
lea ecx, [esi + 8]
call fcn.004e75c0
mov al, byte [esi + 0xe2d]
test al, al
jle 0x4c7b5c
mov cl, byte [esi + 0xe2f]
test cl, cl
jg 0x4c7b5a
mov edx, dword [esi + 0xe0c]
mov byte [esi + 0x271], 1
mov byte [edx + 0xb1], 1
jmp 0x4c7b7c
test al, al
jge 0x4c7b7c
mov al, byte [esi + 0xe2f]
test al, al
jl 0x4c7b7c
mov eax, dword [esi + 0xe0c]
mov byte [esi + 0x261], 1
mov byte [eax + 0xa1], 1
mov al, byte [esi + 0xe2e]
test al, al
jle 0x4c7ba8
mov cl, byte [esi + 0xe30]
test cl, cl
jg 0x4c7ba6
mov ecx, dword [esi + 0xe0c]
mov byte [esi + 0x251], 1
mov byte [ecx + 0x91], 1
jmp 0x4c7bc8
test al, al
jge 0x4c7bc8
mov al, byte [esi + 0xe30]
test al, al
jl 0x4c7bc8
mov edx, dword [esi + 0xe0c]
mov byte [esi + 0x241], 1
mov byte [edx + 0x81], 1
mov eax, dword [esi + 0xe0c]
xor ecx, ecx
xor edx, edx
mov cl, byte [eax + 0x101]
mov dl, byte [eax + 0x121]
mov ebp, ecx
xor ecx, ecx
mov cl, byte [eax + 0x131]
shl ebp, 1
or ebp, edx
xor edx, edx
mov dl, byte [eax + 0x111]
shl ebp, 1
or ebp, ecx
shl ebp, 1
or ebp, edx
mov dword [esp + 0x14], ebp
je 0x4c7c14
mov ecx, dword [0x6b4ca8]
mov edx, dword [0x6b4ca8]
mov dword [esi + 0x918], edx
mov cl, byte [esi + 0x94c]
mov byte [eax + 0x101], 0
mov byte [eax + 0x111], 0
mov byte [eax + 0x121], 0
test cl, cl
mov byte [esi + 0x2c1], 0
mov byte [esi + 0x2d1], 0
mov byte [esi + 0x2e1], 0
mov byte [eax + 0x131], 0
mov byte [esi + 0x2f1], 0
je 0x4c801f
test ebp, ebp
je 0x4c7dab
xor edi, edi
push str.Combo_error
push 1
mov dword [esp + 0x4c], edi
xor ebx, ebx
call fcn.004015b0
mov edx, dword [esi + 0x968]
add esp, 8
test edx, edx
je 0x4c7d9c
mov eax, esi
lea edi, [esi + 0x95f]
mov cl, byte [eax + 0x95c]
test cl, cl
je 0x4c7d6c
mov al, byte [edi - 1]
test al, al
jne 0x4c7cb8
xor eax, eax
xor ecx, ecx
mov ax, word [esi + 0x902]
mov cx, word [esi + 0x904]
jmp 0x4c7cca
xor eax, eax
xor ecx, ecx
mov ax, word [esi + 0x906]
mov cx, word [esi + 0x908]
cmp eax, dword [esp + 0x48]
jg 0x4c7d6c
cmp ecx, dword [esp + 0x48]
jl 0x4c7d6c
mov cl, byte [edx]
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x44]
or ecx, eax
test ebp, eax
mov dword [esp + 0x44], ecx
je 0x4c7d6c
cmp eax, 1
jne 0x4c7d19
mov byte [edi], al
mov al, byte [edi - 2]
test al, al
je 0x4c7d34
mov byte [edi - 2], 0
mov ecx, dword [esi + 0x84]
mov dword [edi + 1], ecx
mov eax, dword [edi + 9]
inc eax
mov dword [edi + 9], eax
jmp 0x4c7d5c
cmp byte [edi], 0
je 0x4c7cfc
mov eax, dword [esi + 0xe0c]
mov cl, byte [eax + 0x110]
test cl, cl
jne 0x4c7cfc
mov byte [edi - 3], 0
jmp 0x4c7d6c
mov ebp, dword [esi + 0x84]
xor eax, eax
mov al, byte [edx + 1]
mov edx, dword [edi + 1]
mov ecx, ebp
sub ecx, edx
cmp ecx, eax
ja 0x4c7d58
mov dword [edi + 1], ebp
mov eax, dword [edi + 9]
add eax, 2
mov dword [edi + 9], eax
jmp 0x4c7d5c
mov byte [edi - 3], 0
mov edx, dword [edi + 9]
cmp byte [edx], 0xff
je 0x4c7fa8
mov ebp, dword [esp + 0x14]
inc ebx
add edi, 0x10
cmp ebx, 0x100
push str.Combo_error
setl al
push eax
call fcn.004015b0
mov edx, dword [edi + 9]
add esp, 8
test edx, edx
lea eax, [edi - 0x95f]
jne 0x4c7c8f
mov edi, dword [esp + 0x44]
mov ecx, edi
or ecx, ebp
cmp ecx, edi
je 0x4c7dab
mov byte [esi + 0x94c], 0
mov eax, dword [esp + 0x48]
xor edx, edx
mov dx, word [esi + 0x8fe]
cmp edx, eax
jg 0x4c83f7
xor ecx, ecx
mov cx, word [esi + 0x900]
cmp ecx, eax
jl 0x4c83f7
mov al, byte [esp + 0x27]
test al, al
jne 0x4c7de5
push 0x5564e4
mov ecx, esi
call fcn.00460e80
mov edi, dword [esi + 0x954]
xor ebp, ebp
cmp edi, ebp
push str.Bad_collision_parts_info
setne dl
push edx
call fcn.004015b0
mov word [esp + 0x24], bp
mov word [esp + 0x22], bp
mov word [esp + 0x20], bp
mov al, byte [edi]
add esp, 8
cmp al, 0xff
je 0x4c7e5f
lea ebx, [esi + 0x37c]
movzx ax, al
mov word [esp + 0x1e], ax
mov al, byte [esi + 0x378]
inc edi
test al, al
jne 0x4c7e47
mov edx, ebx
lea ecx, [ebx + 0xc0]
mov eax, dword [edx]
mov dword [ecx], eax
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov edx, dword [edx + 8]
mov dword [ecx + 8], edx
lea eax, [esp + 0x18]
push eax
push esi
push ebx
call fcn.00453ee0
mov al, byte [edi]
add esp, 0xc
add ebx, 0xc
cmp al, 0xff
jne 0x4c7e1b
mov al, byte [esi + 0x378]
test al, al
jne 0x4c83f0
mov eax, dword [0x56e990]
cmp eax, ebp
mov dword [esp + 0x34], eax
je 0x4c83f7
mov edi, dword [esp + 0x34]
test byte [edi + 4], 2
je 0x4c7f94
cmp word [edi + 0x38], 0x13c
je 0x4c7f94
mov edx, dword [esi + 0xa7c]
test edx, edx
je 0x4c7ebe
xor eax, eax
test edx, edx
jle 0x4c7ebe
lea ecx, [esi + 0xa6c]
cmp edi, dword [ecx]
je 0x4c7f94
inc eax
add ecx, 4
cmp eax, edx
jl 0x4c7eae
lea ecx, [edi + 8]
lea edx, [esi + 8]
push ecx
push edx
call fcn.004e6220
add esp, 8
cmp eax, 0x2bc
jge 0x4c7f94
mov eax, dword [esp + 0x34]
push eax
call fcn.00475f50
mov ebp, dword [esi + 0x954]
add esp, 4
xor ebx, ebx
mov cl, byte [ebp]
inc ebp
cmp cl, 0xff
je 0x4c7f90
lea edi, [esi + 0x43c]
lea edx, [edi - 0xc0]
push edi
lea eax, [esp + 0x5c]
push edx
push eax
call fcn.004e7760
mov ecx, dword [eax]
mov dword [esp + 0x20], 1
mov dword [esp + 0x58], ecx
lea ecx, [esp + 0x20]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x60], edx
lea edx, [esp + 0x5c]
mov eax, dword [eax + 8]
push edx
mov dword [esp + 0x68], eax
lea eax, [esp + 0x78]
push eax
call fcn.004e7840
add esp, 0x18
lea ecx, [esp + 0x4c]
push eax
call fcn.004e7590
push edi
lea ecx, [esp + 0x50]
call fcn.004e7590
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x18]
push 0x1800
lea edx, [esp + 0x50]
push ecx
push edx
push edi
push eax
call fcn.004f7ae0
add esp, 0x14
test eax, eax
jne 0x4c8127
mov cl, byte [ebp]
inc ebx
add edi, 0xc
inc ebp
cmp cl, 0xff
jne 0x4c7f01
mov edi, dword [esp + 0x34]
mov eax, dword [edi + 0x20]
test eax, eax
mov dword [esp + 0x34], eax
je 0x4c83f7
jmp 0x4c7e7e
mov ax, word [esi + 0x8fc]
lea ecx, [ebx + ebx*2 + 9]
mov edx, eax
and eax, 0xffff
and edx, 0xffff
push 0x556bc4
lea edi, [eax*4 + 0x6a8cb4]
mov edx, dword [edx*4 + 0x6a8cb4]
mov eax, dword [edi]
mov ecx, dword [edx + ecx*4]
test eax, eax
setne dl
push edx
mov dword [esi + 0x958], ecx
call fcn.004015b0
mov ecx, dword [edi]
lea eax, [ebx + ebx*2]
add esp, 8
mov dx, word [ecx + eax*4 + 0x28]
lea eax, [ecx + eax*4 + 0x28]
mov cx, word [eax + 2]
add eax, 2
mov word [esi + 0x90a], dx
mov word [esi + 0x90c], cx
mov dx, word [eax + 2]
mov word [esi + 0x914], dx
jmp 0x4c7da4
mov edx, dword [esp + 0x48]
xor ecx, ecx
mov cx, word [esi + 0x902]
cmp ecx, edx
jle 0x4c806d
mov byte [eax + 0x101], 0
mov byte [eax + 0x111], 0
mov byte [eax + 0x121], 0
mov byte [esi + 0x2c1], 0
mov byte [esi + 0x2d1], 0
mov byte [esi + 0x2e1], 0
mov byte [eax + 0x131], 0
mov byte [esi + 0x2f1], 0
jmp 0x4c7dab
mov ecx, dword [esi + 0x958]
test ecx, ecx
je 0x4c7dab
xor eax, eax
mov ax, word [esi + 0x90a]
cmp edx, eax
jl 0x4c7dab
mov ax, word [esi + 0x914]
test ax, ax
je 0x4c8100
cmp word [esi + 0x12a], ax
je 0x4c80f2
and eax, 0xffff
mov word [esi + 0x916], 0
mov edx, eax
mov eax, dword [edx*4 + 0x6a82b8]
test eax, eax
mov dword [esi + 0x350], eax
je 0x4c80dc
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4c80dc
and ecx, 0xffff
mov dword [eax], ecx
mov ecx, dword [eax + 4]
add eax, 4
cmp ecx, 0xffffffff
jne 0x4c80c9
push 0xffffffffffffffff
push 0
push edx
mov ecx, esi
call fcn.00460c10
mov byte [esp + 0x27], 0
jmp 0x4c7dab
mov al, byte [esi + 0x142]
test al, al
je 0x4c7dab
mov di, word [ecx]
xor ecx, ecx
mov cx, word [esi + 0x90c]
push ecx
push edi
mov ecx, esi
call fcn.004c87d0
mov eax, edi
pop edi
pop esi
pop ebp
and eax, 0xffff
pop ebx
add esp, 0x144
ret
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x3c]
xor ebp, ebp
push eax
push ecx
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
call fcn.00453ee0
xor edi, edi
mov al, byte [esp + 0x2a]
mov di, word [esi + 0x8fc]
mov dword [esp + 0xa0], ebp
mov dword [esp + 0xa4], ebp
mov dword [esp + 0xa8], ebp
mov ecx, dword [edi*4 + 0x6a8cb4]
mov dword [esp + 0x98], ebp
mov byte [esp + 0x94], 0xf
add esp, 0xc
mov dl, byte [ecx + 0x10]
mov byte [esp + 0x89], al
neg dl
sbb dl, dl
xor eax, eax
and edx, 0x40
or dl, 0xf
mov byte [esp + 0x88], dl
mov ax, word [ecx + 8]
mov ecx, dword [0x5559dc]
cmp ecx, 2
je 0x4c81ba
cmp ecx, 3
je 0x4c81ba
cmp ecx, 4
jne 0x4c81bc
add eax, eax
mov ecx, dword [0x54d474]
cmp ecx, 2
je 0x4c81e3
cmp ecx, ebp
jne 0x4c81d0
shl eax, 0xd
jmp 0x4c81e0
cmp ecx, 1
lea eax, [eax + eax*2]
jne 0x4c81dd
shl eax, 0xb
jmp 0x4c81e0
shl eax, 0xa
sar eax, 0xc
mov edx, dword [esp + 0x4c]
lea ecx, [ebx + ebx*2]
mov word [esp + 0x90], ax
mov dword [esp + 0x98], ebp
mov eax, dword [esi + ecx*4 + 0x43c]
mov ecx, dword [esp + 0x54]
sub edx, eax
lea eax, [ebx + ebx*2 + 0x111]
sar edx, 0xc
mov ebx, dword [esi + eax*4]
mov dword [esp + 0x94], edx
sub ecx, ebx
lea edx, [esp + 0x94]
lea eax, [esp + 0x94]
push edx
sar ecx, 0xc
push eax
mov dword [esp + 0xa4], ecx
call fcn.00470430
mov eax, dword [esi + 0x5ac]
add esp, 8
cmp eax, ebp
je 0x4c8280
mov cx, word [esi + 0x12a]
cmp cx, 0x64
je 0x4c8267
cmp cx, 0x66
je 0x4c8267
cmp cx, 0x68
je 0x4c8267
cmp cx, 0x6a
jne 0x4c8280
mov ecx, dword [esp + 0x90]
dec eax
mov dword [esi + 0x5ac], eax
lea edx, [ecx + ecx]
mov word [esp + 0x90], dx
mov edi, dword [edi*4 + 0x6a8cb4]
cmp word [edi + 0x1a], bp
je 0x4c82b7
mov al, byte [esp + 0x88]
or al, 0x10
mov byte [esp + 0x88], al
mov ax, word [edi + 0x1a]
mov word [esp + 0xa0], ax
mov cx, word [edi + 0x1c]
mov word [esp + 0xa2], cx
jmp 0x4c82c5
push str.Random_slide_distance
push ebp
call fcn.004015b0
add esp, 8
mov edx, dword [0x56f3b8]
mov al, byte [edx + 0x180]
test al, al
je 0x4c82e7
mov al, byte [esi + 0xad4]
test al, al
jne 0x4c82e7
push ebp
mov ecx, esi
call fcn.004c64a0
mov edi, dword [esp + 0x34]
lea ecx, [esp + 0x88]
push ecx
mov ecx, edi
mov eax, dword [edi]
call dword [eax + 0xc]
test eax, eax
je 0x4c83c1
mov al, byte [esi + 0x354]
test al, al
jne 0x4c832b
movsx edx, word [esi + 0xe2]
mov byte [esi + 0x354], 1
mov dword [esi + 0x358], edx
mov eax, dword [0x6b4ca8]
mov dword [esi + 0x35c], eax
mov ecx, dword [esi + 0x528]
mov ax, word [esi + 0x12a]
add ecx, 0xb
mov dword [esi + 0x534], 0x168
shl ecx, 0xa
cmp ax, 0x6a
mov dword [esi + 0x52c], ecx
je 0x4c83a3
cmp ax, 0x71
je 0x4c83a3
cmp ax, 0x68
je 0x4c838a
cmp ax, 0x6f
je 0x4c838a
lea edx, [esp + 0x38]
push ebp
push edx
push 2
call fcn.004e5da0
add esp, 4
add eax, 0xe
push eax
call fcn.00471ea0
add esp, 0xc
lea eax, [esp + 0x38]
push ebp
push eax
jmp 0x4c83ba
lea ecx, [esp + 0x38]
push ebp
push ecx
push 0x10
call fcn.00471ea0
add esp, 0xc
lea edx, [esp + 0x38]
push 1
push edx
jmp 0x4c83ba
lea eax, [esp + 0x38]
push ebp
push eax
push 0x11
call fcn.00471ea0
add esp, 0xc
lea ecx, [esp + 0x38]
push 2
push ecx
mov ecx, esi
call fcn.004c6e10
mov eax, dword [esi + 0xa7c]
cmp eax, 4
jge 0x4c83f7
mov dword [esi + eax*4 + 0xa6c], edi
mov eax, dword [esi + 0xa7c]
inc eax
pop edi
mov dword [esi + 0xa7c], eax
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x144
ret
mov byte [esi + 0x378], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x144
ret