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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94
push ebx
push esi
mov esi, dword [ebp + 8]
xor ecx, ecx
push edi
xor edi, edi
mov dword [esp + 0x44], ecx
push str.SShd
mov edx, esi
mov dword [esp + 0x8c], edi
mov dword [esp + 0x90], edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], ecx
call fcn.004161e0
add esp, 4
test eax, eax
je 0x4beb50
mov edx, str.ads_ss2_pcm_adx__800
mov ecx, esi
call fcn.0040b140
test eax, eax
je 0x4beb50
push 4
push edi
push 4
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4be95c
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, 0x18
je 0x4be9f0
push 4
push 0
push 4
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4be99c
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, 0x20
je 0x4be9f0
push 4
push 0
push 4
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
je 0x4be9b9
or ebx, 0xffffffff
jmp 0x4be9dc
movzx ebx, byte [esp + 0x13]
movzx eax, byte [esp + 0x12]
shl ebx, 8
or ebx, eax
mov eax, dword [esp + 0x10]
shl ebx, 8
movzx ecx, ah
or ebx, ecx
movzx eax, al
shl ebx, 8
or ebx, eax
mov eax, dword [esi + 4]
push esi
call eax
sub eax, 8
add esp, 4
cmp ebx, eax
jne 0x4beb50
push str.SSbd
mov edx, esi
mov ecx, 0x20
call fcn.004161e0
add esp, 4
test eax, eax
je 0x4beb50
push 4
push 0
push 8
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
je 0x4bea29
or ebx, 0xffffffff
jmp 0x4bea4c
movzx ebx, byte [esp + 0x13]
movzx eax, byte [esp + 0x12]
shl ebx, 8
or ebx, eax
mov eax, dword [esp + 0x10]
shl ebx, 8
movzx ecx, ah
or ebx, ecx
movzx eax, al
shl ebx, 8
or ebx, eax
push 4
push 0
push 0xc
lea eax, [esp + 0x1c]
mov dword [esp + 0x40], ebx
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
je 0x4bea72
mov dword [esp + 0x50], 0xffffffff
jmp 0x4bea99
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 + 0x50], edx
push 4
push 0
push 0x10
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
je 0x4beabb
mov dword [esp + 0x18], 0xffffffff
jmp 0x4beae2
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 + 0x18], edx
push 4
push 0
push 0x14
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
je 0x4beaff
or edx, 0xffffffff
jmp 0x4beb22
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 + 0x10], edx
cmp ebx, 2
ja 0x4beb36
je 0x4beb94
sub ebx, edi
je 0x4beb43
sub ebx, 1
jmp 0x4beb41
cmp ebx, 0x10
je 0x4beb94
cmp ebx, reloc.libg719_decode.dll_Ordinal_1
je 0x4beb60
push str.ADS:_unknown_codec_n
call fcn.0040b9e0
add esp, 4
mov ecx, edi
call fcn.00405c10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x50], 0x2ee0
mov dword [esp + 0x24], 1
jne 0x4beb9c
cmp edx, 0x200
jne 0x4beb9c
mov dword [esp + 0x50], 0xbb80
mov dword [esp + 0x10], 0x40
mov dword [esp + 0x24], 0x2e
jmp 0x4beb9c
mov dword [esp + 0x24], 0x20
mov eax, dword [esi + 4]
push esi
call eax
add esp, 4
mov edi, eax
lea eax, [esp + 0x14]
push 4
push 0
push 0x24
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
je 0x4bebc4
or edx, 0xffffffff
jmp 0x4bebe7
movzx edx, byte [esp + 0x17]
movzx eax, byte [esp + 0x16]
shl edx, 8
or edx, eax
mov eax, dword [esp + 0x14]
shl edx, 8
movzx ecx, ah
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
lea eax, [edx + 0x28]
mov dword [esp + 0x20], edx
cmp eax, edi
jbe 0x4bebf9
lea edx, [edi - 0x28]
mov dword [esp + 0x20], edx
lea ecx, [edx + edx]
lea eax, [edi - 0x18]
cmp ecx, eax
jne 0x4bec0a
lea edx, [ecx - 0x10]
mov dword [esp + 0x20], edx
sub edi, edx
cmp edi, 0x800
sbb ebx, ebx
and ebx, 0xfffff828
add ebx, 0x800
cmp dword [esp + 0x24], 0x20
mov dword [esp + 0x14], ebx
jne 0x4bed67
push 4
push 0
push 0x28
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bed63
movzx edx, byte [esp + 0x17]
movzx eax, byte [esp + 0x16]
shl edx, 8
or edx, eax
mov eax, dword [esp + 0x14]
shl edx, 8
movzx ecx, ah
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
mov dword [esp + 0x14], ebx
cmp edx, 0x1000
jne 0x4bed67
push 4
push 0
push 0x2c
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bed63
movzx edx, byte [esp + 0x17]
movzx eax, byte [esp + 0x16]
shl edx, 8
or edx, eax
mov eax, dword [esp + 0x14]
shl edx, 8
movzx ecx, ah
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
mov dword [esp + 0x14], ebx
jne 0x4bed67
push 4
push 0
push 0x1008
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bed0b
movzx edx, byte [esp + 0x17]
movzx eax, byte [esp + 0x16]
shl edx, 8
or edx, eax
mov eax, dword [esp + 0x14]
shl edx, 8
movzx ecx, ah
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
mov dword [esp + 0x14], ebx
je 0x4bed67
mov edi, 0x2c
push 4
mov eax, edi
cdq
push edx
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bed63
movzx edx, byte [esp + 0x17]
movzx eax, byte [esp + 0x16]
shl edx, 8
or edx, eax
mov eax, dword [esp + 0x14]
shl edx, 8
movzx ecx, ah
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
jne 0x4bed63
add edi, 4
cmp edi, 0x1008
jl 0x4bed10
mov dword [esp + 0x14], 0xff8
jmp 0x4bed67
mov dword [esp + 0x14], ebx
push 4
push 0
push 0x18
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
je 0x4bed84
or edi, 0xffffffff
jmp 0x4beda7
movzx edi, byte [esp + 0x1f]
movzx eax, byte [esp + 0x1e]
shl edi, 8
or edi, eax
mov eax, dword [esp + 0x1c]
shl edi, 8
movzx ecx, ah
or edi, ecx
movzx eax, al
shl edi, 8
or edi, eax
push 4
push 0
push 0x1c
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
je 0x4bedc4
or ebx, 0xffffffff
jmp 0x4bede7
movzx ebx, byte [esp + 0x1f]
movzx eax, byte [esp + 0x1e]
shl ebx, 8
or ebx, eax
mov eax, dword [esp + 0x1c]
shl ebx, 8
movzx ecx, ah
or ebx, ecx
movzx eax, al
shl ebx, 8
or ebx, eax
mov dword [esp + 0x1c], 0
cmp edi, 0xffffffff
je 0x4bf0ee
cmp ebx, 0xffffffff
jne 0x4beec9
cmp dword [esp + 0x34], 2
jne 0x4bee33
mov edx, edi
mov dword [esp + 0x9c], 1
shl edx, 4
mov dword [esp + 0x30], edx
lea eax, [edx + 0x200]
cmp eax, dword [esp + 0x20]
sbb eax, eax
neg eax
mov dword [esp + 0x1c], eax
jmp 0x4bf0f0
push str.PAD_
mov edx, esi
mov ecx, 0x28
call fcn.004161e0
add esp, 4
test eax, eax
je 0x4bee7b
mov ecx, dword [esp + 0x18]
xor edx, edx
shr edi, 1
mov eax, edi
mov dword [esp + 0x1c], 1
div ecx
mov dword [esp + 0x88], 1
mov dword [esp + 0x8c], eax
mov eax, 1
jmp 0x4bf0f4
test edi, 0x7ff
jne 0x4beeae
test edi, edi
je 0x4beeae
lea eax, [edi - 0x800]
mov dword [esp + 0x1c], 1
mov dword [esp + 0x30], eax
mov eax, 1
mov dword [esp + 0x98], 1
jmp 0x4bf0f0
mov edx, edi
mov dword [esp + 0x1c], 1
shl edx, 4
mov eax, 1
mov dword [esp + 0x30], edx
jmp 0x4bf0f0
test ebx, ebx
je 0x4bf0ee
mov ecx, dword [esp + 0x20]
mov eax, ecx
shr eax, 9
cmp ebx, eax
ja 0x4bef7b
cmp dword [esp + 0x24], 1
jne 0x4bef7b
mov ecx, edi
mov eax, 1
shl ecx, 9
mov dword [esp + 0x30], ecx
mov ecx, ebx
shl ecx, 9
mov dword [esp + 0x40], ecx
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
mov edx, eax
call fcn.00405ab0
mov edi, eax
test edi, edi
je 0x4beb50
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x24]
mov dword [edi + 4], eax
mov eax, dword [esp + 0x10]
mov dword [edi + 0x24], eax
mov eax, edx
mov dword [edi + 0xc], edx
mov dword [edi + 0x10], 1
mov dword [edi + 0x14], 0x31
sub eax, 1
je 0x4bf655
sub eax, 0x1f
je 0x4bf632
sub eax, 0xe
jne 0x4beb50
mov ecx, dword [esp + 0x18]
test ecx, ecx
jle 0x4bf68b
lea eax, [ebx + ebx]
xor edx, edx
div ecx
mov edx, dword [esp + 0x24]
mov ebx, eax
jmp 0x4bf68d
mov eax, 0x24924925
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
mov edx, dword [esp + 0x24]
shr eax, 6
mov dword [esp + 0x4c], eax
cmp ebx, eax
ja 0x4befaf
cmp edx, 1
jne 0x4befaf
imul ecx, edi, 0x70
mov eax, edx
mov dword [esp + 0x30], ecx
imul ecx, ebx, 0x70
jmp 0x4bef00
mov eax, ecx
shr eax, 5
mov dword [esp + 0x34], eax
cmp ebx, eax
ja 0x4beffe
cmp edx, 1
jne 0x4befd6
mov ecx, edi
mov eax, edx
shl ecx, 5
mov dword [esp + 0x30], ecx
mov ecx, ebx
shl ecx, 5
jmp 0x4bef00
cmp edx, 0x20
jne 0x4beffe
mov ecx, dword [esp + 0x18]
mov eax, edi
shl eax, 5
mov dword [esp + 0x30], eax
mov eax, ebx
shl eax, 5
mov dword [esp + 0x1c], 1
mov dword [esp + 0x40], eax
jmp 0x4bf0ff
mov eax, ecx
shr eax, 4
cmp ebx, eax
ja 0x4bf0b7
cmp edx, 0x20
jne 0x4bf0b7
mov eax, ebx
shl eax, 4
mov dword [esp + 0x3c], eax
add eax, 0x38
cdq
push 4
push edx
push eax
lea eax, [esp + 0x34]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf062
mov eax, dword [esp + 0x28]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x2a]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x2b]
shl ecx, 8
or ecx, eax
cmp ecx, 0x77777
je 0x4bf0ab
mov eax, dword [esp + 0x3c]
add eax, 0x48
cdq
push 4
push edx
push eax
lea eax, [esp + 0x34]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf0b7
mov eax, dword [esp + 0x28]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x2a]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x2b]
shl ecx, 8
or ecx, eax
cmp ecx, 0x77777
jne 0x4bf0b7
mov ecx, dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x1c], eax
jmp 0x4bf0ff
mov eax, dword [esp + 0x24]
cmp ebx, dword [esp + 0x34]
jbe 0x4bf0c6
cmp eax, 0x20
je 0x4bf0d1
cmp ebx, dword [esp + 0x4c]
jbe 0x4bf0ee
cmp eax, 1
jne 0x4bf0ee
mov eax, 1
mov dword [esp + 0x8c], edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x88], eax
jmp 0x4bf0f0
xor eax, eax
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x24], 0x20
jne 0x4bef04
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
add edx, ebx
mov eax, edx
sub eax, dword [esp + 0x10]
shl ecx, 4
mov dword [esp + 0x48], eax
lea edi, [edx + 4]
mov dword [esp + 0x20], ecx
lea ecx, [ecx]
sub edi, 0x10
sub edx, 0x10
push 1
mov dword [esp + 0x40], edx
lea eax, [edi - 3]
cdq
push edx
push eax
lea eax, [esp + 0x47]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 1
jne 0x4bf14f
cmp byte [esp + 0x3b], 7
je 0x4bf617
mov eax, dword [esp + 0x3c]
cdq
mov ecx, eax
mov eax, edx
push 4
push eax
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x30]
push ecx
push eax
mov eax, dword [esi]
push esi
mov dword [esp + 0x8c], ecx
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf26e
mov eax, dword [esp + 0x28]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x2a]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x2b]
shl ecx, 8
or ecx, eax
jne 0x4bf26e
push 4
mov eax, edi
cdq
push edx
push eax
lea eax, [esp + 0x60]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf26e
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
jne 0x4bf26e
push 4
lea eax, [edi + 4]
cdq
push edx
push eax
lea eax, [esp + 0x64]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf26e
mov eax, dword [esp + 0x58]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x5a]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x5b]
shl ecx, 8
or ecx, eax
jne 0x4bf26e
push 4
lea eax, [edi + 8]
cdq
push edx
push eax
lea eax, [esp + 0x68]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf26e
mov eax, dword [esp + 0x5c]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x5e]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x5f]
shl ecx, 8
or ecx, eax
je 0x4bf617
push 4
push dword [esp + 0x78]
lea eax, [esp + 0x68]
push dword [esp + 0x80]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf3b6
mov eax, dword [esp + 0x60]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x62]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x63]
shl ecx, 8
or ecx, eax
cmp ecx, 0x7777
jne 0x4bf3b6
push 4
mov eax, edi
cdq
push edx
push eax
lea eax, [esp + 0x70]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf3b6
mov eax, dword [esp + 0x64]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x66]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x67]
shl ecx, 8
or ecx, eax
cmp ecx, 0x77777777
jne 0x4bf3b6
push 4
lea eax, [edi + 4]
cdq
push edx
push eax
lea eax, [esp + 0x90]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf3b6
mov eax, dword [esp + 0x84]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x86]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x87]
shl ecx, 8
or ecx, eax
cmp ecx, 0x77777777
jne 0x4bf3b6
push 4
lea eax, [edi + 8]
cdq
push edx
push eax
lea eax, [esp + 0xa0]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf3b6
mov eax, dword [esp + 0x94]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x96]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x97]
shl ecx, 8
or ecx, eax
cmp ecx, 0x77777777
je 0x4bf617
push 4
push dword [esp + 0x78]
lea eax, [esp + 0x98]
push dword [esp + 0x80]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf4e5
mov eax, dword [esp + 0x90]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x92]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x93]
shl ecx, 8
or ecx, eax
cmp ecx, 0xc020000
jne 0x4bf4e5
push 4
mov eax, edi
cdq
push edx
push eax
lea eax, [esp + 0x74]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf4e5
mov eax, dword [esp + 0x68]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x6a]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x6b]
shl ecx, 8
or ecx, eax
jne 0x4bf4e5
push 4
lea eax, [edi + 4]
cdq
push edx
push eax
lea eax, [esp + 0x78]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf4e5
mov eax, dword [esp + 0x6c]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x6e]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x6f]
shl ecx, 8
or ecx, eax
jne 0x4bf4e5
push 4
lea eax, [edi + 8]
cdq
push edx
push eax
lea eax, [esp + 0x7c]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf4e5
mov eax, dword [esp + 0x70]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x72]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x73]
shl ecx, 8
or ecx, eax
jne 0x4bf4e5
cmp dword [esp + 0x98], ecx
jne 0x4bf617
push 4
push dword [esp + 0x78]
lea eax, [esp + 0x84]
push dword [esp + 0x80]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf629
mov eax, dword [esp + 0x7c]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x7e]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x7f]
shl ecx, 8
or ecx, eax
cmp ecx, 0xc010000
jne 0x4bf629
push 4
mov eax, edi
cdq
push edx
push eax
lea eax, [esp + 0x8c]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf629
mov eax, dword [esp + 0x80]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x82]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x83]
shl ecx, 8
or ecx, eax
jne 0x4bf629
push 4
lea eax, [edi + 4]
cdq
push edx
push eax
lea eax, [esp + 0x58]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf629
mov eax, dword [esp + 0x4c]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x4e]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x4f]
shl ecx, 8
or ecx, eax
jne 0x4bf629
push 4
lea eax, [edi + 8]
cdq
push edx
push eax
lea eax, [esp + 0x40]
push eax
mov eax, dword [esi]
push esi
call eax
add esp, 0x14
cmp eax, 4
jne 0x4bf629
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
jne 0x4bf629
cmp dword [esp + 0x9c], ecx
je 0x4bf629
sub ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x3c]
cmp edx, dword [esp + 0x48]
jg 0x4bf120
mov eax, dword [esp + 0x1c]
jmp 0x4bef08
mov ecx, dword [esp + 0x18]
test ecx, ecx
jle 0x4bf68b
mov eax, ebx
xor edx, edx
div ecx
mov edx, dword [esp + 0x24]
shr eax, 4
lea ebx, [eax*8]
sub ebx, eax
shl ebx, 2
jmp 0x4bf68d
mov ecx, dword [esp + 0x18]
test ecx, ecx
jle 0x4bf68b
mov eax, dword [esp + 0x18]
xor ecx, ecx
cdq
push edx
shld ecx, ebx, 3
push eax
push ecx
shl ebx, 3
push ebx
call fcn.0051ef30
push 0
push 0x10
push edx
push eax
call fcn.0051ef30
mov ecx, dword [esp + 0x18]
mov ebx, eax
mov edx, dword [esp + 0x24]
jmp 0x4bf68d
xor ebx, ebx
mov dword [edi], ebx
cmp dword [edi + 0x18], 0
je 0x4bf77e
cmp dword [esp + 0x88], 0
je 0x4bf6b2
mov eax, dword [esp + 0x8c]
mov dword [edi + 0x1c], eax
jmp 0x4bf76c
sub edx, 1
je 0x4bf6fb
sub edx, 0x1f
jne 0x4beb50
test ecx, ecx
jle 0x4bf763
mov eax, dword [esp + 0x30]
div ecx
xor edx, edx
shr eax, 4
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [esp + 0x40]
div dword [esp + 0x18]
shl ecx, 2
shr eax, 4
mov dword [edi + 0x1c], ecx
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 2
jmp 0x4bf768
cmp dword [esp + 0x18], 0
mov eax, ecx
cdq
mov ecx, edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x48], ecx
jle 0x4bf763
mov edx, dword [esp + 0x30]
xor eax, eax
push ecx
push dword [esp + 0x40]
shld eax, edx, 3
shl edx, 3
push eax
push edx
call fcn.0051ef30
push 0
push 0x10
push edx
push eax
call fcn.0051ef30
push dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
push dword [esp + 0x40]
mov dword [edi + 0x1c], eax
xor eax, eax
shld eax, ecx, 3
shl ecx, 3
push eax
push ecx
call fcn.0051ef30
push 0
push 0x10
push edx
push eax
call fcn.0051ef30
mov dword [esp + 0x44], eax
jmp 0x4bf76c
xor ecx, ecx
mov dword [edi + 0x1c], ecx
mov dword [esp + 0x44], ecx
mov eax, dword [esp + 0x44]
mov dword [edi + 0x20], eax
test eax, eax
je 0x4bf77b
cmp eax, ebx
jle 0x4bf77e
mov dword [edi + 0x20], ebx
push 0
push dword [esp + 0x18]
mov edx, esi
mov ecx, edi
call fcn.004064d0
add esp, 8
test eax, eax
je 0x4beb50
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret