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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
mov eax, dword [0x5ff004]
xor eax, esp
mov dword [esp + 0x218], eax
push ebx
push esi
push edi
push 0x8c
xor edi, edi
lea eax, [esp + 0x34]
mov ebx, ecx
mov esi, edx
push edi
push eax
mov dword [esp + 0x1c], ebx
call fcn.00504370
add esp, 0xc
mov edx, ebx
xor ecx, ecx
push str.RIFF
call fcn.0041ad90
add esp, 4
test eax, eax
jne 0x4cf488
push str.RIFX
mov edx, ebx
xor ecx, ecx
call fcn.0041ad90
add esp, 4
test eax, eax
je case.0x4cf7cb.41
mov edx, str.wem_wav_lwav_ogg_logg_xma_bnk
mov ecx, ebx
call fcn.0040b140
test eax, eax
je case.0x4cf7cb.41
xor eax, eax
lea edx, [esp + 0x30]
test esi, esi
mov ecx, ebx
setne al
mov dword [esp + 0x40], eax
call fcn.004d0790
test eax, eax
je case.0x4cf7cb.41
test esi, esi
je 0x4cf4c4
mov eax, dword [esp + 0x38]
mov dword [esi], eax
cmp dword [esp + 0x30], edi
je 0x4cf4e4
mov dword [esp + 0x24], fcn.004108c0
mov dword [esp + 0x1c], fcn.004108c0
mov dword [esp + 0x2c], 0x4042e0
jmp 0x4cf4fc
mov dword [esp + 0x24], fcn.00410860
mov dword [esp + 0x1c], fcn.00410860
mov dword [esp + 0x2c], fcn.00404290
mov ebx, dword [esp + 0x8c]
mov ecx, ebx
mov edx, dword [esp + 0xb0]
call fcn.00405ab0
mov edi, eax
test edi, edi
je case.0x4cf7cb.41
mov eax, dword [esp + 0xb4]
mov esi, dword [esp + 0x50]
mov ecx, dword [esp + 0x90]
mov dword [edi + 0x1c], eax
mov eax, dword [esp + 0xb8]
mov dword [edi + 0x20], eax
mov eax, dword [esp + 0xa4]
mov dword [edi + 0x144], eax
mov eax, dword [esp + 0x84]
mov dword [edi + 0x14], 0x119
mov dword [edi + 4], ecx
mov dword [esp + 0x28], esi
mov dword [edi + 0x40], esi
cmp eax, 0xd
ja case.0x4cf7cb.41
jmp dword [eax*4 + 0x4d0638]
mov eax, dword [esp + 0x48]
cmp eax, 0x10
je 0x4cf58b
cmp eax, 0x12
je 0x4cf58b
cmp eax, 0x18
je 0x4cf58b
cmp eax, 0x28
jne case.0x4cf7cb.41
cmp dword [esp + 0x9c], 0x10
jne case.0x4cf7cb.41
xor eax, eax
mov dword [edi + 0x24], 2
cmp dword [esp + 0x30], eax
setne al
inc eax
mov dword [edi + 0xc], eax
xor eax, eax
cmp ebx, 1
setg al
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4cf5c8
mov esi, dword [esp + 0x34]
sub esi, dword [esp + 0x4c]
xor ecx, ecx
test ebx, ebx
jle 0x4cf5f2
mov eax, ebx
cdq
push edx
shld ecx, esi, 3
push eax
push ecx
shl esi, 3
push esi
call fcn.0051ef30
push 0
push 0x10
push edx
push eax
call fcn.0051ef30
mov ecx, eax
mov eax, dword [esp + 0x38]
mov dword [edi], ecx
test eax, eax
je 0x4d0603
mov esi, dword [esp + 0x4c]
test ecx, ecx
jne 0x4d0607
mov dword [edi], 1
jmp 0x4d0607
mov eax, dword [esp + 0x48]
cmp eax, 0x14
je 0x4cf62a
cmp eax, 0x28
je 0x4cf62a
cmp eax, 0x18
jne case.0x4cf7cb.41
cmp dword [esp + 0x9c], 4
jne case.0x4cf7cb.41
mov eax, dword [esp + 0x94]
lea ecx, [ebx + ebx*8]
shl ecx, 2
mov dword [esp + 0x2c], ecx
cmp eax, ecx
jne case.0x4cf7cb.41
cdq
idiv ebx
cmp dword [esp + 0x48], 0x14
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x30]
mov dword [edi + 0xc], 0x41
mov dword [edi + 0x10], 1
mov dword [edi + 0x184], eax
jne 0x4cf69e
cmp dword [esp + 0x88], 0x69
jne 0x4cf69e
cmp ebx, 2
jg case.0x4cf7cb.41
test eax, eax
jne case.0x4cf7cb.41
mov dword [edi + 0xc], 0x38
mov dword [edi + 0x10], eax
mov dword [edi + 0x24], eax
cmp dword [esp + 0x38], 0
je 0x4cf6b1
mov esi, dword [esp + 0x34]
sub esi, dword [esp + 0x4c]
mov dword [esp + 0x28], esi
test ebx, ebx
jle 0x4d05ff
xor edx, edx
mov eax, esi
div ecx
test edx, edx
jle 0x4cf6dd
lea eax, [ebx*4]
cmp edx, eax
jle 0x4cf6dd
sub edx, eax
add edx, edx
mov eax, edx
cdq
idiv ebx
mov dword [esp + 0x20], eax
jmp 0x4cf6e5
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0x28]
lea ecx, [ebx*4]
xor edx, edx
mov esi, dword [esp + 0x2c]
div dword [esp + 0x2c]
sub esi, ecx
xor edx, edx
imul eax, esi
add eax, eax
div ebx
add eax, dword [esp + 0x20]
jmp 0x4d0601
mov eax, dword [esp + 0x30]
mov dword [esp + 0xd8], eax
mov eax, dword [esp + 0x4c]
add eax, esi
mov dword [esp + 0xcc], 0
cmp dword [esp + 0x94], 0
mov dword [esp + 0xd0], 0
mov dword [esp + 0xd4], 0
mov dword [esp + 0xe0], 0
mov dword [esp + 0xe4], 0
mov dword [esp + 0xe8], 0
mov dword [esp + 0xec], 0
mov dword [esp + 0xf0], 0
mov dword [esp + 0xc4], ebx
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xdc], eax
jne case.0x4cf7cb.41
cmp dword [esp + 0x9c], 0
jne case.0x4cf7cb.41
mov esi, dword [esp + 0x5c]
test esi, esi
je 0x4cf9c4
mov eax, dword [esp + 0x60]
add eax, 0xffffffd8
cmp eax, 0xc
ja case.0x4cf7cb.41
movzx eax, byte [eax + 0x4d0680]
jmp dword [eax*4 + 0x4d0670]
xor eax, eax
mov dword [esp + 0x28], 0x18
mov dword [esp + 0x20], eax
jmp 0x4cf830
mov dword [esp + 0x28], 0x18
mov dword [esp + 0x20], 0x30
mov dword [esp + 0xe4], 1
jmp 0x4cf825
mov dword [esp + 0x28], 0x10
mov dword [esp + 0x20], 0x28
mov dword [esp + 0xe4], 2
mov dword [esp + 0xe8], 1
mov dword [esp + 0xe0], 3
mov ebx, dword [esp + 0x10]
push ebx
push esi
call dword [esp + 0x24]
add esi, dword [esp + 0x30]
push ebx
push esi
mov dword [edi], eax
call dword [esp + 0x34]
lea ecx, [esi + 4]
mov dword [esp + 0x28], eax
push ebx
push ecx
call dword [esp + 0x3c]
mov dword [esp + 0x40], eax
add esp, 0x18
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4cf8cf
mov ebx, dword [esp + 0x5c]
mov esi, dword [esp + 0x10]
add ebx, eax
push 1
mov eax, ebx
cdq
push edx
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 1
je 0x4cf889
or al, 0xff
jmp 0x4cf88d
mov al, byte [esp + 0x1c]
movzx eax, al
mov dword [esp + 0xd0], eax
lea eax, [ebx + 1]
cdq
push 1
push edx
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 1
je 0x4cf8bf
or al, 0xff
movzx eax, al
mov dword [esp + 0xcc], eax
jmp 0x4cf8d3
mov al, byte [esp + 0x1c]
movzx eax, al
mov dword [esp + 0xcc], eax
jmp 0x4cf8d3
mov esi, ebx
xor eax, eax
mov ebx, dword [esp + 0x50]
sub ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x60]
cmp ecx, 0x2a
jne 0x4cf914
cmp eax, dword [esp + 0xd0]
jne 0x4cf9ac
mov edx, dword [esp + 0x18]
lea eax, [esp + 0xc4]
push eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0xec], 0
lea edx, [edx + eax]
jmp 0x4cfb11
cmp ecx, 0x34
jne 0x4cf9ac
mov esi, dword [esp + 0x18]
push dword [esp + 0x10]
add esi, dword [esp + 0x50]
push esi
call dword [esp + 0x34]
mov word [esp + 0x24], ax
lea eax, [esi + 6]
mov esi, dword [esp + 0x18]
cdq
push 4
push edx
push eax
lea eax, [esp + 0x34]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x1c
cmp eax, 4
jne 0x4cf995
movzx ecx, byte [esp + 0x21]
movzx eax, byte [esp + 0x22]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x23]
shl ecx, 8
or ecx, eax
cmp ecx, 0x424356
jne 0x4cf995
mov edx, dword [esp + 0x18]
lea eax, [esp + 0xc4]
push eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0xe4], 1
lea edx, [edx + eax]
jmp 0x4cfb11
mov eax, 0x200
cmp word [esp + 0x1c], ax
jbe 0x4cf9ac
mov dword [esp + 0xe0], 2
mov edx, dword [esp + 0x18]
lea eax, [esp + 0xc4]
push eax
mov eax, dword [esp + 0x50]
lea edx, [edx + eax]
jmp 0x4cfb11
mov esi, dword [esp + 0x44]
add esi, 0x18
cmp dword [esp + 0xa8], 0x30
mov dword [esp + 0x20], esi
jne case.0x4cf7cb.41
mov ebx, dword [esp + 0x10]
xor eax, eax
cmp dword [esp + 0x3c], eax
push ebx
setne al
mov dword [esp + 0xe8], 2
add eax, 3
push esi
mov dword [esp + 0xe8], eax
call dword [esp + 0x24]
add esi, 0x10
mov dword [edi], eax
push ebx
push esi
call dword [esp + 0x34]
lea ecx, [esi + 4]
mov dword [esp + 0x28], eax
push ebx
push ecx
call dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x40], eax
push 1
lea eax, [ebx + 0x28]
cdq
push edx
push eax
lea eax, [esp + 0x40]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x2c
cmp eax, 1
je 0x4cfa47
or al, 0xff
jmp 0x4cfa4b
mov al, byte [esp + 0x1c]
mov byte [esp + 0x17], al
movzx eax, al
mov dword [esp + 0xd0], eax
lea eax, [ebx + 0x29]
cdq
push 1
push edx
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 1
je 0x4cfa77
or al, 0xff
jmp 0x4cfa7b
mov al, byte [esp + 0x1c]
mov ebx, dword [esp + 0x50]
sub ebx, dword [esp + 0x28]
mov byte [esp + 0x1c], al
movzx eax, al
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x4cfaad
add eax, 4
push esi
push eax
call dword [esp + 0x2c]
mov edx, dword [esp + 0x20]
add esp, 8
add edx, eax
jmp 0x4cfab1
mov edx, dword [esp + 0x18]
mov cl, byte [esp + 0x17]
xor eax, eax
cmp byte [esp + 0x1c], cl
lea ecx, [esp + 0xc4]
push ecx
sete al
mov ecx, esi
dec eax
and eax, 1
mov dword [esp + 0xec], eax
mov eax, dword [esp + 0x50]
add eax, edx
push 1
mov edx, eax
mov dword [esp + 0x20], eax
call fcn.004e9140
add esp, 8
mov dword [edi + 0x1a4], eax
test eax, eax
jne 0x4cfb2b
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x18]
neg eax
sbb eax, eax
add eax, 4
mov dword [esp + 0xe0], eax
lea eax, [esp + 0xc4]
push eax
push 1
mov ecx, esi
call fcn.004e9140
add esp, 8
mov dword [edi + 0x1a4], eax
test eax, eax
je case.0x4cf7cb.41
mov esi, dword [esp + 0x28]
add esi, dword [esp + 0x4c]
cmp dword [esp + 0x38], 0
mov eax, dword [esp + 0x30]
mov dword [edi + 0x10], 0
mov dword [edi + 0xc], 0x78
mov dword [edi + 0x184], eax
je 0x4d0607
mov eax, dword [esp + 0x34]
sub eax, esi
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jns 0x4cfb6c
fadd qword [0x5f8bd8]
mov dword [esp + 0x18], ebx
fimul dword [edi]
fild dword [esp + 0x18]
test ebx, ebx
jns 0x4cfb80
fadd qword [0x5f8bd8]
fdivp st(1)
call fcn.0051f100
mov dword [edi], eax
jmp 0x4d0607
cmp dword [esp + 0x9c], 4
jne case.0x4cf7cb.41
mov edx, dword [esp + 0x64]
mov dword [edi + 0xc], 0x17
mov dword [edi + 0x10], 1
mov dword [edi + 0x24], 8
mov dword [esp + 0x20], edx
test edx, edx
je 0x4cfc0e
test ebx, ebx
jg 0x4cfbc5
xor ecx, ecx
jmp 0x4cfbdd
xor edx, edx
mov eax, esi
div ebx
mov edx, dword [esp + 0x64]
shr eax, 3
lea ecx, [eax*8]
sub ecx, eax
add ecx, ecx
imul eax, ebx, 0x2e
mov dword [edi], ecx
cmp dword [esp + 0x68], eax
jne case.0x4cf7cb.41
mov ecx, dword [esp + 0x10]
push 1
push edx
lea edx, [esp + 0x38]
call fcn.004d0690
mov ecx, dword [esp + 0x40]
add esp, 8
test eax, eax
je 0x4cfc59
shr esi, 1
mov dword [edi + 0x24], esi
jmp 0x4cfc59
imul eax, ebx, 0x2e
add eax, 0xc
cmp dword [esp + 0xa8], eax
jne case.0x4cf7cb.41
mov esi, dword [esp + 0x44]
push dword [esp + 0x10]
lea eax, [esi + 0x18]
push eax
call dword [esp + 0x24]
mov ecx, dword [esp + 0x40]
add esp, 8
mov dword [edi], eax
lea eax, [esi + 0x1c]
mov dword [esp + 0x20], eax
test ecx, ecx
jne 0x4cfc5d
cmp ebx, 1
je 0x4cfc59
cmp dword [esp + 0x40], ecx
je 0x4cfc59
mov eax, dword [esp + 0x50]
shr eax, 1
mov dword [edi + 0x24], eax
test ecx, ecx
je 0x4cfc81
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x4c]
test ebx, ebx
jg 0x4cfc6d
xor ecx, ecx
jmp 0x4cfc7f
xor edx, edx
div ebx
shr eax, 3
lea ecx, [eax*8]
sub ecx, eax
add ecx, ecx
mov dword [edi], ecx
cmp dword [esp + 0xb0], 0
je 0x4cfcaa
cmp dword [edi + 0x1c], 0
jne 0x4cfcaa
mov eax, dword [esp + 0x90]
lea eax, [eax + eax*4]
shl eax, 2
cmp dword [edi + 0x20], eax
jge 0x4cfcaa
mov dword [edi + 0x18], 0
mov esi, dword [esp + 0x30]
mov ecx, edi
mov edx, dword [esp + 0x10]
push esi
push 0x2e
push dword [esp + 0x28]
call fcn.004dcbd0
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov edx, dword [esp + 0x10]
add eax, 0x24
mov ecx, edi
push esi
push 0x2e
push eax
call fcn.004dccd0
add esp, 0xc
jmp 0x4d0603
cmp dword [esp + 0x30], 0
jne 0x4cfcfe
mov ecx, dword [esp + 0x10]
mov edx, str.wem_bnk
call fcn.0040b140
test eax, eax
je case.0x4cf7cb.41
mov eax, dword [esp + 0x58]
test eax, eax
jne 0x4cfd0a
mov eax, dword [esp + 0x48]
mov ebx, dword [esp + 0x54]
mov ecx, ebx
test ebx, ebx
jne 0x4cfd18
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x10]
push eax
push ecx
push esi
push dword [esp + 0x58]
mov ecx, edx
call fcn.004e11d0
add esp, 0x10
mov dword [edi + 0x1a4], eax
test eax, eax
je case.0x4cf7cb.41
mov eax, dword [esp + 0xac]
mov dword [edi + 0xc], 0x83
mov dword [edi + 0x10], 0
mov dword [edi], eax
test ebx, ebx
jne 0x4cfd5a
mov ebx, dword [esp + 0x44]
push dword [edi + 8]
mov ecx, dword [esp + 0x14]
mov edx, ebx
call fcn.004e5a80
mov edx, dword [esp + 0x14]
add esp, 4
mov ecx, edi
push 0
push 1
push eax
push esi
push dword [esp + 0x5c]
call fcn.004e5d80
add esp, 0x14
cmp dword [esp + 0x38], 0
je 0x4d0603
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jns 0x4cfda6
fadd qword [0x5f8bd8]
mov dword [esp + 0x18], esi
fimul dword [edi]
fild dword [esp + 0x18]
test esi, esi
jns 0x4cfdba
fadd qword [0x5f8bd8]
fdivp st(1)
call fcn.0051f100
jmp 0x4d0601
cmp dword [esp + 0x48], 0x18
jne case.0x4cf7cb.41
cmp dword [esp + 0x30], 0
je case.0x4cf7cb.41
push dword [esp + 0x94]
push dword [esp + 0x9c]
push ecx
push ebx
push dword [esp + 0x98]
lea ecx, [esp + 0x114]
push esi
call fcn.004e0710
mov ecx, dword [esp + 0x28]
push 0
push 0
push esi
push 0
push dword [esp + 0x74]
cdq
push edx
push eax
lea edx, [esp + 0x134]
call fcn.00409810
add esp, 0x34
test eax, eax
jne 0x4cfe41
mov dword [edi + 0x1a4], eax
mov ecx, edi
call fcn.00405c10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.00502eb4
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x74]
mov dword [edi + 0x1a4], eax
mov dword [edi + 0xc], 0x83
mov dword [edi + 0x10], 0
test ecx, ecx
je 0x4cfe86
mov eax, dword [esp + 0x78]
test eax, eax
je 0x4cfe86
test ebx, ebx
je 0x4cfe86
push dword [esp + 0x10]
add ecx, 0xfffffffc
add eax, ecx
push eax
call fcn.004108c0
cdq
add esp, 8
idiv ebx
shr eax, 1
mov dword [edi], eax
jne 0x4cfeb6
jmp 0x4cfe8c
mov dword [edi], 0
push dword [esp + 0x94]
mov eax, dword [esp + 0x94]
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x14]
push eax
push ebx
push dword [esp + 0x94]
push esi
call fcn.004e5c50
add esp, 0x14
mov dword [edi], eax
cmp dword [esp + 0x38], 0
mov dword [esp + 0x18], eax
je 0x4d0603
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x4c]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
jns 0x4cfedd
fadd qword [0x5f8bd8]
fimul dword [esp + 0x18]
mov dword [esp + 0x18], esi
fild dword [esp + 0x18]
test esi, esi
jns 0x4cfef3
fadd qword [0x5f8bd8]
fdivp st(1)
call fcn.0051f100
jmp 0x4d0601
cmp dword [esp + 0x48], 0x24
jne case.0x4cf7cb.41
cmp dword [esp + 0x94], 0
jne case.0x4cf7cb.41
cmp dword [esp + 0x9c], 0
jne case.0x4cf7cb.41
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x10]
push 0
push 0
push esi
cdq
push edx
push eax
push 0
push 0
xor edx, edx
call fcn.00409810
add esp, 0x1c
test eax, eax
je case.0x4cf7cb.41
mov dword [edi + 0x1a4], eax
mov dword [edi + 0xc], 0x83
mov dword [edi + 0x10], 0
mov eax, dword [eax + 0x48]
jmp 0x4d0601
cmp dword [esp + 0x48], 0x28
jne case.0x4cf7cb.41
mov esi, dword [esp + 0x44]
push dword [esp + 0x10]
lea eax, [esi + 0x18]
push eax
call dword [esp + 0x24]
push dword [esp + 0x18]
mov dword [edi], eax
lea eax, [esi + 0x24]
push eax
call dword [esp + 0x34]
mov ecx, dword [esp + 0x5c]
add esp, 0x10
mov esi, dword [esp + 0x50]
add ecx, eax
mov dword [esp + 0x24], ecx
sub esi, eax
mov dword [esp + 0x28], esi
lea edx, [ecx + 8]
mov ecx, dword [esp + 0x10]
call fcn.004e2b50
shr eax, 3
cmp dword [edi + 4], 0xbb80
mov dword [esp + 0x18], eax
je 0x4cffec
push dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
mov edx, esi
mov dword [edi + 4], 0xbb80
call fcn.004e2c30
add esp, 4
sub eax, dword [esp + 0x18]
mov dword [edi], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x20], eax
jmp 0x4cfff4
mov dword [esp + 0x20], 0xbb80
cmp dword [esp + 0x38], 0
je 0x4d0030
mov esi, dword [esp + 0x34]
sub esi, dword [esp + 0x24]
mov dword [esp + 0x2c], esi
fild dword [esp + 0x2c]
jns 0x4d0013
fadd qword [0x5f8bd8]
fimul dword [edi]
mov eax, dword [esp + 0x28]
fild dword [esp + 0x28]
test eax, eax
jns 0x4d0027
fadd qword [0x5f8bd8]
fdivp st(1)
call fcn.0051f100
mov dword [edi], eax
push 0x114
lea eax, [esp + 0x110]
push 0
push eax
call fcn.00504370
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x104], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x108], eax
lea eax, [esp + 0x100]
push 0
push eax
push esi
mov dword [esp + 0x10c], ebx
call fcn.004e2e60
add esp, 0xc
mov dword [edi + 0x1a4], eax
test eax, eax
je case.0x4cf7cb.41
mov esi, dword [esp + 0x24]
mov dword [edi + 0xc], 0x83
mov dword [edi + 0x10], 0
jmp 0x4d0607
cmp dword [esp + 0x94], 0
jne case.0x4cf7cb.41
cmp dword [esp + 0x9c], 0
jne case.0x4cf7cb.41
mov eax, dword [esp + 0x44]
mov ebx, dword [esp + 0x10]
add eax, 0x18
push ebx
push eax
call dword [esp + 0x24]
add esp, 8
mov dword [esp + 0x18], eax
cmp dword [esp + 0x38], 0
mov dword [edi], eax
je 0x4d0118
mov esi, dword [esp + 0x34]
sub esi, dword [esp + 0x4c]
mov dword [esp + 0x20], esi
fild dword [esp + 0x20]
jns 0x4d00f9
fadd qword [0x5f8bd8]
fimul dword [esp + 0x18]
mov eax, dword [esp + 0x50]
fild dword [esp + 0x50]
test eax, eax
jns 0x4d010f
fadd qword [0x5f8bd8]
fdivp st(1)
call fcn.0051f100
mov dword [edi], eax
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x4d0136
add eax, 4
push ebx
push eax
call dword [esp + 0x2c]
mov ecx, dword [esp + 0x54]
add esp, 8
add ecx, eax
sub esi, eax
jmp 0x4d013a
mov ecx, dword [esp + 0x4c]
push 0
push 0
mov eax, ecx
mov ecx, ebx
push esi
cdq
push edx
push eax
push 0
push 0
xor edx, edx
call fcn.00409810
add esp, 0x1c
mov dword [edi + 0x1a4], eax
test eax, eax
je case.0x4cf7cb.41
mov dword [edi + 0xc], 0x83
mov dword [edi + 0x10], 0
jmp 0x4d0603
cmp dword [esp + 0x9c], 0x10
jne case.0x4cf7cb.41
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x10]
push 0
push 0
push eax
mov eax, dword [esp + 0x58]
cdq
push edx
push eax
push 0
push 0
xor edx, edx
call fcn.00409810
add esp, 0x1c
mov dword [edi + 0x1a4], eax
test eax, eax
je case.0x4cf7cb.41
jmp 0x4cff52
push 0x10c
lea eax, [esp + 0x10c]
push 0
push eax
call fcn.00504370
add esp, 0xc
mov dword [esp + 0x21c], 0
cmp dword [esp + 0x94], 0
jne case.0x4cf7cb.41
cmp dword [esp + 0x9c], 0
jne case.0x4cf7cb.41
mov eax, dword [esp + 0x74]
test eax, eax
je case.0x4cf7cb.41
cmp ebx, 0xff
jg case.0x4cf7cb.41
push dword [esp + 0x10]
mov dword [esp + 0x218], eax
mov eax, dword [esp + 0x48]
add eax, 0x18
mov dword [esp + 0x104], ebx
push eax
mov dword [edi + 4], 0xbb80
call dword [esp + 0x24]
push dword [esp + 0x18]
mov dword [edi], eax
mov eax, dword [esp + 0x50]
add eax, 0x1c
push eax
call dword [esp + 0x34]
push dword [esp + 0x20]
mov dword [esp + 0x22c], eax
mov eax, dword [esp + 0x58]
add eax, 0x20
push eax
call dword [esp + 0x44]
movzx eax, ax
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x5c]
add eax, 0x23
cdq
push 1
push edx
push eax
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x38]
push eax
mov eax, dword [eax]
call eax
add esp, 0x2c
cmp eax, 1
je 0x4d0294
or al, 0xff
mov byte [esp + 0x17], al
jmp 0x4d02a9
mov al, byte [esp + 0x1c]
mov byte [esp + 0x17], al
cmp al, 1
jne 0x4d02a9
cmp ebx, 8
jg case.0x4cf7cb.41
mov eax, dword [esp + 0x44]
add eax, 0x22
cdq
push 1
push edx
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [eax]
call eax
add esp, 0x14
cmp eax, 1
jne case.0x4cf7cb.41
cmp byte [esp + 0x1c], al
jne case.0x4cf7cb.41
cmp dword [esp + 0x38], 0
je 0x4d0315
mov esi, dword [esp + 0x34]
sub esi, dword [esp + 0x4c]
mov dword [esp + 0x18], esi
fild dword [esp + 0x18]
jns 0x4d02f8
fadd qword [0x5f8bd8]
fimul dword [edi]
mov eax, dword [esp + 0x50]
fild dword [esp + 0x50]
test eax, eax
jns 0x4d030c
fadd qword [0x5f8bd8]
fdivp st(1)
call fcn.0051f100
mov dword [edi], eax
cmp byte [esp + 0xa0], 1
jne 0x4d03de
cmp byte [esp + 0x17], 1
jne 0x4d03a8
cmp ebx, 8
jg case.0x4cf7cb.41
mov eax, dword [esp + 0xa4]
cmp eax, 0x607
ja 0x4d0391
je 0x4d0354
cmp eax, 3
je 0x4d038a
cmp eax, 7
je 0x4d038a
cmp eax, 0x603
jne 0x4d039d
mov ecx, 2
mov eax, ebx
mov dword [esp + 0x10c], ecx
sub eax, ecx
mov dword [esp + 0x110], eax
test ebx, ebx
jle 0x4d03e7
lea eax, [ebx*8 + 0x52cd90]
push ebx
push eax
lea eax, [esp + 0x11c]
push eax
call fcn.00504df0
add esp, 0xc
jmp 0x4d03e7
mov ecx, 1
jmp 0x4d0359
sub eax, 0x60f
je 0x4d0354
sub eax, 0x30
je 0x4d03a1
xor ecx, ecx
jmp 0x4d0359
mov ecx, 3
jmp 0x4d0359
cmp byte [esp + 0x17], 0xff
jne 0x4d03de
xor eax, eax
mov dword [esp + 0x10c], 0
mov dword [esp + 0x110], ebx
test ebx, ebx
jle 0x4d03e7
jmp 0x4d03d0
mov byte [esp + eax + 0x114], al
inc eax
cmp eax, ebx
jl 0x4d03d0
jmp 0x4d03e7
cmp ebx, 2
jg case.0x4cf7cb.41
mov edx, dword [esp + 0x4c]
lea eax, [esp + 0x100]
mov ecx, dword [esp + 0x10]
push 7
push eax
push esi
call fcn.004e2e60
add esp, 0xc
jmp 0x4d0154
cmp dword [esp + 0x48], 0x18
jne case.0x4cf7cb.41
cmp dword [esp + 0x30], 0
jne case.0x4cf7cb.41
mov dword [edi + 0xc], 0x24
mov dword [edi + 0x10], 1
mov dword [edi + 0x24], 0x10
test ebx, ebx
jg 0x4d043f
xor ecx, ecx
mov dword [edi], ecx
jmp 0x4d0603
xor edx, edx
mov eax, esi
div ebx
shr eax, 4
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 2
mov dword [edi], ecx
jmp 0x4d0603
cmp dword [esp + 0x48], 0x24
jne case.0x4cf7cb.41
cmp dword [esp + 0xa8], 0x12
jne case.0x4cf7cb.41
mov esi, dword [esp + 0x44]
push 4
mov dword [esp + 0xf8], ebx
lea eax, [esi + 0x18]
cdq
push edx
push eax
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [eax]
call eax
add esp, 0x14
cmp eax, 4
je 0x4d04a2
or ecx, 0xffffffff
jmp 0x4d04c5
mov eax, dword [esp + 0x20]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x22]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x23]
shl ecx, 8
or ecx, eax
mov ebx, dword [esp + 0x10]
lea eax, [esi + 0x20]
push ebx
push eax
mov dword [esp + 0x100], ecx
call dword [esp + 0x34]
add esp, 8
movzx eax, ax
lea ecx, [esp + 0xf4]
mov dword [esp + 0xfc], eax
call fcn.004e82b0
mov dword [edi + 0x1a4], eax
test eax, eax
je case.0x4cf7cb.41
lea eax, [esi + 0x1c]
mov dword [edi + 0xc], 0x80
push ebx
push eax
mov dword [edi + 0x10], 0
call dword [esp + 0x24]
add esp, 8
mov dword [edi], eax
cmp dword [esp + 0x38], 0
je 0x4d0603
mov esi, dword [esp + 0xf8]
mov ebx, 1
mov eax, dword [esp + 0x34]
mov ecx, esi
sub eax, dword [esp + 0x4c]
mov edx, esi
shr ecx, 0x14
and ecx, 0xf
shr edx, 3
mov dword [esp + 0x18], eax
and edx, 3
mov eax, esi
and eax, 0xff000000
mov ecx, dword [ecx*4 + 0x52f8e8]
shl ebx, cl
mov ecx, edx
shl ebx, cl
cmp eax, 0xfe000000
jne 0x4d05ff
mov eax, dword [esp + 0x18]
xor edx, edx
shr esi, 5
and esi, 0x7ff
inc esi
shl esi, cl
div esi
imul eax, ebx
jmp 0x4d0601
cmp dword [esp + 0x9c], 4
jne case.0x4cf7cb.41
mov edx, dword [esp + 0x94]
lea eax, [ebx + ebx*8]
shl eax, 2
cmp edx, eax
je 0x4d05b4
imul ecx, ebx, 0x104
cmp edx, ecx
jne case.0x4cf7cb.41
mov eax, edx
mov dword [edi + 0xc], 0x62
cdq
idiv ebx
cmp dword [esp + 0x38], 0
mov dword [edi + 0x10], 1
mov dword [esp + 0x18], eax
mov dword [edi + 0x24], eax
je 0x4d05dd
mov esi, dword [esp + 0x34]
sub esi, dword [esp + 0x4c]
test ebx, ebx
jle 0x4d05ff
cmp eax, 6
jb 0x4d05ff
mov ecx, eax
xor edx, edx
imul ecx, ebx
mov eax, esi
div ecx
mov ecx, dword [esp + 0x18]
add ecx, 0xfffffffc
imul eax, ecx
add eax, eax
jmp 0x4d0601
xor eax, eax
mov dword [edi], eax
mov esi, dword [esp + 0x4c]
mov edx, dword [esp + 0x10]
mov ecx, edi
push 0
push esi
call fcn.004064d0
add esp, 8
test eax, eax
je case.0x4cf7cb.41
mov ecx, dword [esp + 0x224]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00502eb4
mov esp, ebp
pop ebp
ret