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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10bc
call fcn.0051efe0
mov eax, dword [0x5ff004]
xor eax, esp
mov dword [esp + 0x10b8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x1c], eax
push 4
push ecx
mov dword [esp + 0x20], eax
xor ebx, ebx
mov dword [esp + 0x40], eax
xor esi, esi
push ecx
lea eax, [esp + 0x2c]
mov dword [esp + 0x3c], ebx
push eax
mov eax, dword [edi]
push edi
mov dword [esp + 0x40], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x50], ecx
call eax
add esp, 0x14
cmp eax, 4
jne 0x4a543e
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
cmp ecx, 0x52494646
jne 0x4a543e
push 4
push esi
push 4
lea eax, [esp + 0x2c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a533a
mov dword [esp + 0x28], 0xffffffff
jmp 0x4a5361
movzx edx, byte [esp + 0x23]
movzx eax, byte [esp + 0x22]
shl edx, 8
or edx, eax
mov eax, dword [esp + 0x20]
shl edx, 8
movzx ecx, ah
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
mov dword [esp + 0x28], edx
mov eax, dword [edi + 4]
push edi
call eax
mov ecx, dword [esp + 0x2c]
add esp, 4
add ecx, 8
cmp ecx, eax
jne 0x4a543e
push 4
push 0
push 8
lea eax, [esp + 0x2c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4a543e
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
cmp ecx, 0x57415645
jne 0x4a543e
mov edx, str.sns_wav_lwav_son
mov ecx, edi
call fcn.0040b140
test eax, eax
je 0x4a543e
xor eax, eax
mov dword [esp + 0x64], 0xc
mov edx, edi
mov dword [esp + 0x58], eax
lea ecx, [esp + 0x58]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
call fcn.004e8210
test eax, eax
je 0x4a543e
lea esp, [esp]
mov eax, dword [esp + 0x58]
cmp eax, 0x64617461
ja 0x4a5471
je 0x4a545c
cmp eax, 0x4c495354
je 0x4a5759
cmp eax, 0x4c795345
je 0x4a5759
cmp eax, 0x63756520
je 0x4a5759
mov ecx, ebx
call fcn.00405c10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10b8]
xor ecx, esp
call fcn.00502eb4
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x60]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x24], eax
jmp 0x4a5759
cmp eax, 0x66616374
je 0x4a56a7
cmp eax, 0x666d7420
jne 0x4a543e
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], ecx
cmp ecx, 0x12
jb 0x4a543e
cdq
push 2
push edx
push eax
lea eax, [esp + 0x54]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 2
je 0x4a54b4
or eax, 0xffffffff
jmp 0x4a54c9
mov ax, word [esp + 0x48]
movzx ecx, ah
movzx eax, al
shl cx, 8
or cx, ax
movzx eax, cx
movzx esi, ax
mov eax, dword [esp + 0x30]
add eax, 2
cdq
push 2
push edx
push eax
lea eax, [esp + 0x2c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 2
je 0x4a54ef
or eax, 0xffffffff
jmp 0x4a5504
mov ax, word [esp + 0x20]
movzx ecx, ah
movzx eax, al
shl cx, 8
or cx, ax
movzx eax, cx
movzx eax, ax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x30]
add eax, 4
cdq
push 4
push edx
push eax
lea eax, [esp + 0x58]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5533
mov dword [esp + 0x38], 0xffffffff
jmp 0x4a555a
movzx edx, byte [esp + 0x4f]
movzx eax, byte [esp + 0x4e]
shl edx, 8
or edx, eax
mov eax, dword [esp + 0x4c]
shl edx, 8
movzx ecx, ah
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
mov dword [esp + 0x38], edx
cmp esi, 0xfffe
jne 0x4a5759
cmp dword [esp + 0x2c], 0x28
jb 0x4a543e
mov eax, dword [esp + 0x30]
add eax, 0x18
cdq
push 4
push edx
push eax
lea eax, [esp + 0x5c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5594
or esi, 0xffffffff
jmp 0x4a55b7
movzx esi, byte [esp + 0x53]
movzx eax, byte [esp + 0x52]
shl esi, 8
or esi, eax
mov eax, dword [esp + 0x50]
shl esi, 8
movzx ecx, ah
or esi, ecx
movzx eax, al
shl esi, 8
or esi, eax
mov eax, dword [esp + 0x30]
add eax, 0x1c
cdq
push 4
push edx
push eax
lea eax, [esp + 0x60]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4a5604
mov eax, dword [esp + 0x54]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x56]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x57]
shl ecx, 8
or ecx, eax
cmp ecx, 0x1000
je 0x4a5759
mov eax, dword [esp + 0x30]
add eax, 0x20
cdq
push 4
push edx
push eax
lea eax, [esp + 0x4c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4a5651
mov eax, dword [esp + 0x40]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x42]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x43]
shl ecx, 8
or ecx, eax
cmp ecx, 0x800000aa
je 0x4a5759
mov eax, dword [esp + 0x30]
add eax, 0x24
cdq
push 4
push edx
push eax
lea eax, [esp + 0x50]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4a543e
mov eax, dword [esp + 0x44]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x46]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x47]
shl ecx, 8
or ecx, eax
cmp ecx, 0x389b71
jne 0x4a543e
jmp 0x4a5759
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], ecx
cmp ecx, 0x10
jne 0x4a543e
add eax, 4
cdq
push 4
push edx
push eax
lea eax, [esp + 0x40]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4a543e
mov eax, dword [esp + 0x34]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x36]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x37]
shl ecx, 8
or ecx, eax
cmp ecx, 0x4c794e20
jne 0x4a543e
mov eax, dword [esp + 0x10]
cdq
push 4
push edx
push eax
lea eax, [esp + 0x34]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5732
mov dword [esp + 0x3c], 0xffffffff
jmp 0x4a5759
movzx edx, byte [esp + 0x2b]
movzx eax, byte [esp + 0x2a]
shl edx, 8
or edx, eax
mov eax, dword [esp + 0x28]
shl edx, 8
movzx ecx, ah
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
mov dword [esp + 0x3c], edx
mov edx, edi
lea ecx, [esp + 0x58]
call fcn.004e8210
test eax, eax
jne 0x4a5410
cmp dword [esp + 0x30], ebx
je 0x4a543e
cmp dword [esp + 0x2c], ebx
je 0x4a543e
cmp dword [esp + 0x14], ebx
je 0x4a543e
cmp dword [esp + 0x24], ebx
je 0x4a543e
cmp dword [esp + 0x10], ebx
je 0x4a543e
cmp dword [esp + 0x1c], ebx
je 0x4a543e
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
lea eax, [edx + edx*4]
shl eax, 2
cmp ecx, eax
jle 0x4a57cb
imul eax, edx, 0xb4
cmp ecx, eax
jge 0x4a57cb
mov edx, 1
jmp 0x4a57cd
xor edx, edx
mov ecx, dword [esp + 0x18]
call fcn.00405ab0
mov ebx, eax
mov dword [esp + 0x28], ebx
test ebx, ebx
je 0x4a543e
mov eax, dword [esp + 0x38]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [ebx + 0x14], 0x14a
mov dword [ebx], eax
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], eax
cmp esi, 0x3157
jg 0x4a5c87
je 0x4a593d
sub esi, 1
je 0x4a5923
sub esi, 0x165
je 0x4a585f
sub esi, 0x2ff0
jne 0x4a543e
mov esi, dword [esp + 0x14]
push 4
mov eax, esi
cdq
push edx
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5996
mov dword [esp + 0x1c], 0xffffffff
jmp 0x4a59bd
mov eax, dword [esp + 0x14]
push 4
lea ecx, [eax + 8]
add eax, 4
cdq
push edx
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x28], ecx
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5889
or esi, 0xffffffff
jmp 0x4a58ac
movzx esi, byte [esp + 0x13]
movzx eax, byte [esp + 0x12]
shl esi, 8
or esi, eax
mov eax, dword [esp + 0x10]
shl esi, 8
movzx ecx, ah
or esi, ecx
movzx eax, al
shl esi, 8
or esi, eax
mov eax, dword [esp + 0x1c]
add eax, esi
cdq
push 4
push edx
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a58ce
or edx, 0xffffffff
jmp 0x4a58f1
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 + 0x24]
mov eax, dword [esp + 0x14]
sub ecx, edx
push esi
push dword [esp + 0x20]
add eax, 0xc
sub ecx, esi
add eax, edx
sub ecx, 0xc
add eax, esi
mov edx, edi
push ecx
push eax
mov ecx, edi
mov dword [esp + 0x24], eax
call fcn.004e11d0
add esp, 0x10
jmp 0x4a5d60
mov dword [ebx + 0xc], 1
mov dword [ebx + 0x10], 1
mov dword [ebx + 0x24], 2
jmp 0x4a604d
mov esi, dword [esp + 0x14]
mov eax, esi
cdq
push 4
push edx
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4a543e
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
cmp edx, 1
jne 0x4a543e
add esi, 4
mov dword [esp + 0x14], esi
jmp 0x4a5835
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 dword [esp + 0x1c], edx
mov eax, dword [esp + 0x18]
dec eax
mov dword [ebx + 0xc], 0x77
mov dword [ebx + 0x10], 0x29
cmp eax, 0xfe
ja 0x4a543e
push 0x1c
push 1
call fcn.0050f2a0
mov esi, eax
add esp, 8
mov dword [esp + 0x2c], esi
test esi, esi
je 0x4a543e
mov eax, dword [esp + 0x18]
push 4
push eax
mov dword [esi], eax
call fcn.0050f2a0
add esp, 8
mov dword [esi + 4], eax
test eax, eax
je 0x4a5c6e
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x1a8], esi
xor esi, esi
mov dword [esp + 0x34], esi
test eax, eax
jle 0x4a5c58
mov ecx, dword [esp + 0x14]
inc eax
lea eax, [ecx + eax*4]
add ecx, 4
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], ecx
lea esp, [esp]
lea eax, [esi*4]
mov dword [esp + 0x28], eax
add eax, ecx
cdq
push 4
push edx
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5a69
or edx, 0xffffffff
jmp 0x4a5a8c
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 eax, dword [esp + 0x44]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x18]
push 0x20
push 1
mov dword [esp + 0x68], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], eax
mov dword [esp + 0x60], edx
call fcn.0050f2a0
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x4a5b8c
mov dword [ecx], 0x406f10
mov dword [ecx + 4], fcn.00406f30
mov dword [ecx + 8], 0x406f50
mov dword [ecx + 0xc], 0x406df0
mov dword [ecx + 0x10], 0x406f70
mov dword [ecx + 0x14], fcn.00406f90
mov eax, dword [edi + 0x18]
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], edi
lea edx, [esp + 0x58]
call fcn.004e4b10
push 0x5f02c0
mov ecx, eax
call fcn.00407550
mov esi, eax
add esp, 4
test esi, esi
je 0x4a543e
push 0x1018
lea eax, [esp + 0xac]
push 0
push eax
call fcn.00504370
add esp, 0xc
lea eax, [esp + 0x58]
push 0x38
push 0
push eax
call fcn.00504370
add esp, 0xc
lea eax, [esp + 0x58]
lea edx, [esp + 0xa8]
mov ecx, esi
push eax
call fcn.004b9fd0
add esp, 4
test eax, eax
je 0x4a5c0c
lea eax, [esp + 0x58]
mov ecx, esi
push eax
lea edx, [esp + 0xac]
call fcn.004b9f40
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x4a5c15
mov ecx, esi
call fcn.004bae80
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push esi
mov eax, dword [eax + 4]
mov dword [edx + eax], ecx
mov eax, dword [esi + 0x14]
call eax
mov eax, dword [esp + 0x30]
add esp, 4
mov ecx, dword [esp + 0x28]
mov eax, dword [eax + 4]
cmp dword [ecx + eax], 0
je 0x4a543e
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x40]
inc esi
mov dword [esp + 0x34], esi
cmp esi, dword [esp + 0x18]
jl 0x4a5a40
mov ecx, dword [esp + 0x2c]
call fcn.0040c860
test eax, eax
je 0x4a543e
jmp 0x4a604d
push dword [esi + 8]
call fcn.005092c3
add esp, 4
push esi
call fcn.005092c3
add esp, 4
jmp 0x4a543e
sub esi, 0x5050
je 0x4a5fb5
sub esi, 1
je 0x4a5d81
sub esi, 1
jne 0x4a543e
mov esi, dword [esp + 0x14]
push 4
lea eax, [esi + 8]
cdq
push edx
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5cc8
or edx, 0xffffffff
jmp 0x4a5ceb
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 eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
add dword [ebx], 0xfffffc00
add dword [ebx + 0x20], 0xfffffc00
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x5c], eax
lea eax, [esi + 0xc]
mov dword [esp + 0x60], ecx
lea ecx, [edx*4]
add eax, ecx
mov dword [esp + 0x70], edx
mov dword [esp + 0x64], eax
lea edx, [esp + 0x58]
mov eax, dword [esp + 0x24]
sub eax, ecx
mov dword [esp + 0x74], 0x400
sub eax, 0xc
mov dword [esp + 0x78], 0
mov dword [esp + 0x68], eax
mov ecx, edi
lea eax, [esi + 0xc]
mov dword [esp + 0x7c], 0x400
push 1
mov dword [esp + 0x70], eax
call fcn.004ec060
add esp, 4
mov dword [ebx + 0x1a4], eax
test eax, eax
je 0x4a543e
mov dword [ebx + 0xc], 0x83
mov dword [ebx + 0x10], 0
jmp 0x4a604d
mov eax, dword [esp + 0x14]
add eax, 4
mov dword [esp + 0x58], 0
cdq
push 4
push edx
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x68], 0
push eax
mov eax, dword [edi]
push edi
mov dword [esp + 0x74], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5dfe
or esi, 0xffffffff
jmp 0x4a5e21
movzx esi, byte [esp + 0x13]
movzx eax, byte [esp + 0x12]
shl esi, 8
or esi, eax
mov eax, dword [esp + 0x10]
shl esi, 8
movzx ecx, ah
or esi, ecx
movzx eax, al
shl esi, 8
or esi, eax
mov eax, dword [esp + 0x14]
add eax, 0x10
mov dword [esp + 0x1c], esi
cdq
push 4
push edx
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x78], esi
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5e51
mov dword [esp + 0x2c], 0xffffffff
jmp 0x4a5e78
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 dword [esp + 0x2c], edx
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
add edx, 0x14
mov ecx, dword [esp + 0x18]
add eax, 0xffffffec
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], eax
test ecx, ecx
jle 0x4a5f13
mov esi, ecx
mov dword [esp + 0x18], ecx
mov ebx, eax
mov edi, edi
push 4
mov eax, edx
cdq
push edx
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi]
push edi
call eax
add esp, 0x14
cmp eax, 4
je 0x4a5ebe
or edx, 0xffffffff
jmp 0x4a5ee1
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
lea ecx, [edx*8]
mov eax, 0xfffffffc
mov edx, dword [esp + 0x14]
sub eax, ecx
add edx, 4
add ebx, eax
add edx, ecx
mov dword [esp + 0x14], edx
sub esi, 1
jne 0x4a5ea0
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x68], eax
mov ecx, esi
imul ecx, dword [esp + 0x18]
cdq
idiv ecx
mov dword [esp + 0x1c], eax
lea ecx, [eax - 1]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x64], ecx
imul ecx, esi
imul ecx, dword [esp + 0x18]
sub eax, ecx
mov ecx, dword [esp + 0x18]
cdq
idiv ecx
mov dword [esp + 0x70], eax
cmp esi, 0x8000
jg 0x4a5f6f
cmp eax, 0xd000
jle 0x4a5f6f
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x64], edx
imul edx, esi
imul edx, ecx
sub eax, edx
cdq
idiv ecx
mov dword [esp + 0x70], eax
mov ecx, dword [ebx]
mov eax, ecx
cdq
idiv dword [esp + 0x2c]
lea eax, [esp + 0x58]
push eax
sub ecx, edx
lea eax, [ebx + 0xc]
mov edx, dword [esp + 0x18]
push 0xb
push dword [ebx + 8]
mov dword [ebx], ecx
mov dword [ebx + 0x20], ecx
mov ecx, edi
push eax
call fcn.004e3d80
add esp, 0x10
mov dword [ebx + 0x1a4], eax
test eax, eax
je 0x4a543e
mov dword [ebx + 0x10], 0
jmp 0x4a604d
cmp dword [esp + 0x18], 0
mov dword [ebx + 0xc], 0x17
mov dword [ebx + 0x10], 1
mov dword [ebx + 0x24], 8
jle 0x4a604d
mov eax, 0x16
mov dword [esp + 0x1c], eax
lea ebx, [ebx]
mov edx, 0x52c41e
mov esi, eax
jmp 0x4a5ff0
mov ecx, dword [ebx + 0x190]
lea esi, [esi + 8]
movzx eax, word [edx - 2]
mov word [ecx + esi - 0xa], ax
mov ecx, dword [ebx + 0x190]
movzx eax, word [edx]
mov word [esi + ecx - 8], ax
mov ecx, dword [ebx + 0x190]
movzx eax, word [edx + 2]
mov word [ecx + esi - 6], ax
mov ecx, dword [ebx + 0x190]
movzx eax, word [edx + 4]
add edx, 8
mov word [ecx + esi - 4], ax
cmp edx, 0x52c43e
jl 0x4a5ff0
mov eax, dword [esp + 0x1c]
add eax, 0x30c
sub dword [esp + 0x18], 1
mov dword [esp + 0x1c], eax
jne 0x4a5fe0
push 0
push dword [esp + 0x18]
mov edx, edi
mov ecx, ebx
call fcn.004064d0
add esp, 8
test eax, eax
je 0x4a543e
mov ecx, dword [esp + 0x10c4]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00502eb4
mov esp, ebp
pop ebp
ret