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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
push 4
xor ebx, ebx
mov dword [esp + 0x50], eax
push ebx
mov dword [esp + 0x58], eax
xor edi, edi
mov dword [esp + 0x44], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
lea eax, [esp + 0x18]
push ebx
push eax
mov eax, dword [esi]
push esi
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0
call eax
add esp, 0x14
cmp eax, 4
jne 0x4c78e7
mov eax, dword [esp + 0x10]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x12]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x13]
shl ecx, 8
or ecx, eax
cmp ecx, 0x52494646
jne 0x4c78e7
mov edx, str.xma_xma2_wav_lwav_nps_str_kmx
mov ecx, esi
call fcn.0040b140
test eax, eax
je 0x4c78e7
mov eax, dword [esi + 4]
push esi
call eax
add esp, 4
mov dword [esp + 0x30], eax
lea eax, [esp + 0x10]
push 4
push ebx
push 4
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
je 0x4c745a
or edx, 0xffffffff
jmp 0x4c747d
movzx edx, byte [esp + 0x13]
movzx eax, byte [esp + 0x12]
shl edx, 8
or edx, eax
mov eax, dword [esp + 0x10]
shl edx, 8
movzx ecx, ah
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
mov ecx, dword [esp + 0x30]
cmp edx, ecx
je 0x4c7490
lea eax, [edx + 8]
cmp eax, ecx
ja 0x4c78e7
xor eax, eax
mov dword [esp + 0x70], 0xc
mov edx, esi
mov dword [esp + 0x64], eax
lea ecx, [esp + 0x64]
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
call fcn.004e8210
test eax, eax
je 0x4c78e7
mov eax, dword [esp + 0x64]
mov dword [esp + 0x14], ebx
cmp eax, 0x584d4132
je 0x4c770c
cmp eax, 0x64617461
je 0x4c76fa
cmp eax, 0x666d7420
jne 0x4c774a
cmp dword [esp + 0x3c], 0
jne 0x4c774a
mov eax, dword [esp + 0x68]
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x4c], eax
mov eax, edi
cdq
push 2
push edx
push eax
lea eax, [esp + 0x40]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 2
je 0x4c7531
or eax, 0xffffffff
jmp 0x4c7546
mov ax, word [esp + 0x34]
movzx ecx, ah
movzx eax, al
shl cx, 8
or cx, ax
movzx eax, cx
movzx eax, ax
cmp eax, 0x6601
jne 0x4c7568
mov ebx, 1
mov dword [esp + 0x1c], fcn.004108c0
mov dword [esp + 0x38], ebx
mov ecx, 0x4042e0
jmp 0x4c75e0
mov ecx, dword [esp + 0x14]
mov ebx, ecx
mov dword [esp + 0x38], ebx
cmp eax, 0x165
jne 0x4c75b1
push ecx
lea eax, [esp + 0x64]
mov dword [esp + 0x58], 1
push eax
lea eax, [esp + 0x64]
mov edx, edi
push eax
lea eax, [esp + 0x64]
mov ecx, esi
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.004e5e50
add esp, 0x1c
jmp 0x4c774a
cmp eax, 0x166
jne 0x4c78e7
test ebx, ebx
je 0x4c75cf
mov dword [esp + 0x1c], fcn.004108c0
mov ecx, 0x4042e0
jmp 0x4c75e0
mov dword [esp + 0x1c], fcn.00410860
mov ecx, fcn.00404290
mov dword [esp + 0x38], ebx
lea eax, [edi + 2]
mov dword [esp + 0x50], 1
push esi
push eax
call ecx
movzx eax, ax
mov dword [esp + 0x18], eax
lea eax, [edi + 4]
push esi
push eax
call dword [esp + 0x2c]
add esp, 0x10
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x4c7616
mov eax, fcn.00410810
mov ecx, fcn.004108c0
jmp 0x4c7620
mov eax, fcn.004107c0
mov ecx, fcn.00410860
push esi
push edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], eax
call eax
mov ecx, 0x166
add esp, 8
cmp ax, cx
jne 0x4c774a
lea eax, [edi + 0x10]
push esi
push eax
call dword [esp + 0x1c]
add esp, 8
cmp ax, 0x22
jl 0x4c774a
mov ebx, dword [esp + 0x20]
lea eax, [edi + 0x18]
push esi
push eax
call ebx
mov dword [esp + 0x28], eax
lea eax, [edi + 0x28]
push esi
push eax
call ebx
mov dword [esp + 0x24], eax
lea eax, [edi + 0x2c]
push esi
push eax
call ebx
add eax, dword [esp + 0x2c]
mov dword [esp + 0x48], eax
lea eax, [edi + 0x30]
cdq
push 1
push edx
push eax
lea eax, [esp + 0x3f]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x2c
cmp eax, 1
je 0x4c769d
mov ebx, 1
jmp 0x4c76d8
mov al, byte [esp + 0x1b]
xor ebx, ebx
test al, al
setne bl
test al, al
jne 0x4c76d8
mov ecx, dword [esp + 0x30]
xor ebx, ebx
mov eax, dword [esp + 0x14]
test ecx, ecx
setg bl
add eax, 0xfffffe80
jne 0x4c76d8
mov eax, dword [esp + 0x20]
add ecx, 0xffffff80
add eax, 0xfffffe80
xor edx, edx
cmp ecx, eax
setge dl
dec edx
and ebx, edx
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x48], eax
jmp 0x4c774a
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x28], eax
jmp 0x4c774a
mov eax, dword [esp + 0x68]
mov ecx, esi
mov edi, dword [esp + 0x6c]
mov edx, edi
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x48]
mov dword [esp + 0x40], 1
push eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.004e5fc0
add esp, 0x18
mov edx, esi
lea ecx, [esp + 0x64]
call fcn.004e8210
test eax, eax
jne 0x4c74d3
cmp dword [esp + 0x3c], eax
jne 0x4c7837
cmp dword [esp + 0x50], eax
jne 0x4c7837
cmp dword [esp + 0x54], eax
je 0x4c78e7
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x80], eax
mov eax, ecx
sar ecx, 4
and eax, 0xf
mov dword [esp + 0x70], edx
mov dword [esp + 0x88], ecx
mov ecx, esi
push edx
mov edx, edi
mov dword [esp + 0x68], 1
mov dword [esp + 0x88], eax
mov dword [esp + 0x78], edi
call fcn.004e5a80
add esp, 4
mov edx, esi
push 0xf
push 0x80
push 0x200
push 0x800
push ecx
lea ecx, [esp + 0x78]
call fcn.004e5370
mov eax, dword [esp + 0xa0]
add esp, 0x14
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x48], eax
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
call fcn.00405ab0
mov ebx, eax
test ebx, ebx
je 0x4c78e9
mov eax, dword [esp + 0x48]
mov edx, esi
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0x20], eax
mov eax, dword [esp + 0x4c]
push eax
mov dword [ebx + 4], ecx
mov ecx, dword [esp + 0x44]
push edi
push dword [esp + 0x30]
mov dword [ebx], ecx
mov ecx, dword [esp + 0x50]
push dword [esp + 0x38]
mov dword [ebx + 0x1c], ecx
mov ecx, esi
mov dword [ebx + 0x14], 0x117
call fcn.004e11d0
add esp, 0x10
mov dword [ebx + 0x1a4], eax
test eax, eax
je 0x4c78e9
push dword [ebx + 8]
mov edx, edi
mov dword [ebx + 0xc], 0x83
mov ecx, esi
mov dword [ebx + 0x10], 0
call fcn.004e5a80
mov edi, dword [esp + 0x30]
add esp, 4
mov edx, esi
mov ecx, ebx
push 1
push 1
push eax
push dword [esp + 0x34]
push edi
call fcn.004e5d80
add esp, 0x14
mov edx, esi
mov ecx, ebx
push 0
push edi
call fcn.004064d0
add esp, 8
test eax, eax
je 0x4c78e9
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
mov ecx, ebx
call fcn.00405c10
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret