Function at 0x4b0526
Capabilities:
Inspect section memory permissions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3e0
xor eax, eax
cmp dword [ebp + 8], eax
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi + 0x264]
push edi
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x48], ecx
je 0x4b0594
test dword [ebp + 8], 0x3fefff
jne 0x4b0594
cmp dword [ebp + 0xc], eax
jne 0x4b0583
cmp dword [ebp + 0x10], eax
jne 0x4b0594
test dword [ebp + 8], 0x40000000
je 0x4b059e
cmp dword [esi + 0x260], eax
jne 0x4b059e
mov ebx, 0x8876086c
jmp 0x4b0c2c
or dword [ebp + 8], 0x1000000
mov edi, 0xc000000
test dword [ebp + 8], edi
mov eax, 0x2000000
je 0x4b05b7
or dword [ebp + 8], eax
mov ecx, dword [ebp + 8]
and ecx, eax
mov dword [ebp - 0x10], ecx
je 0x4b060e
test dword [ebp + 8], 0x40000000
jne 0x4b060e
test dword [ebp + 8], 0x20000000
mov eax, dword [esi + 0x23c]
mov dword [ebp - 0x30], eax
jne 0x4b060e
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
push eax
mov ecx, esi
call fcn.0049f683
mov ebx, eax
test ebx, ebx
jl 0x4b0c2c
cmp dword [ebp - 0x1c], 0
jbe 0x4b060e
test dword [ebp + 8], 0x10000000
je 0x4b060e
mov ebx, 0x88760b56
jmp 0x4b0c2c
mov eax, dword [esi + 0x264]
push 4
xor ecx, ecx
pop ebx
mov edx, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x264]
xor ecx, ecx
mov edx, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x23c]
xor ecx, ecx
mov edx, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
add esp, 0xc
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
je 0x4b0c27
cmp dword [ebp - 4], 0
je 0x4b0c27
test eax, eax
je 0x4b0c27
mov eax, dword [esi + 0x23c]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 8]
and eax, edi
mov dword [ebp - 0x4c], eax
je 0x4b06bc
mov eax, dword [esi + 0x264]
xor ecx, ecx
mov edx, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
pop ecx
mov dword [ebp - 0x24], eax
je 0x4b0c27
test dword [ebp + 8], 0x1000000
je 0x4b06ea
test dword [ebp + 8], 0x40000000
jne 0x4b06ea
push dword [ebp - 0xc]
mov ecx, esi
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00498913
mov ebx, eax
test ebx, ebx
jl 0x4b0c2c
jmp 0x4b0725
xor eax, eax
cmp dword [esi + 0x264], eax
jbe 0x4b070c
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
sub edx, ecx
mov dword [edx + ecx], eax
mov dword [ecx], eax
inc eax
add ecx, ebx
cmp eax, dword [esi + 0x264]
jb 0x4b06fc
xor eax, eax
cmp dword [esi + 0x23c], eax
jbe 0x4b0725
mov ecx, dword [ebp - 0xc]
mov dword [ecx + eax*4], eax
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x4b0716
cmp dword [ebp - 0x10], 0
je 0x4b0751
test dword [ebp + 8], 0x40000000
jne 0x4b0751
push dword [ebp + 8]
mov ecx, esi
push dword [ebp - 0xc]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00498a10
mov ebx, eax
test ebx, ebx
jl 0x4b0c2c
mov eax, dword [ebp + 8]
and eax, 0x10000000
mov dword [ebp - 0x44], eax
je 0x4b0777
xor eax, eax
cmp dword [esi + 0x23c], eax
jbe 0x4b0777
mov ecx, dword [ebp - 0xc]
mov dword [ecx + eax*4], eax
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x4b0768
push dword [ebp - 0xc]
mov ecx, esi
push dword [ebp - 8]
call fcn.0049fa9a
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x10], eax
jl 0x4b0c2c
cmp dword [ebp - 0x4c], 0
je 0x4b08d7
mov eax, dword [esi + 0x264]
shl eax, 2
push eax
push dword [ebp - 4]
push dword [ebp - 0x24]
call sub.msvcrt.dll_memcpy
add esp, 0xc
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.004af798
mov ebx, eax
test ebx, ebx
jl 0x4b0c2c
mov eax, dword [esi + 0x23c]
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
xor eax, eax
cmp edi, eax
pop ecx
mov dword [ebp - 0x40], edi
je 0x4b0c27
cmp dword [ebp - 0x44], eax
jne 0x4b083b
push edi
push dword [ebp - 4]
mov ecx, esi
call fcn.00498ed9
mov ebx, eax
test ebx, ebx
jl 0x4b0c2c
xor ecx, ecx
cmp dword [esi + 0x23c], ecx
jbe 0x4b084f
mov eax, dword [ebp - 0xc]
lea edx, [eax + ecx*4]
mov eax, dword [edx]
cmp eax, 0xffffffff
je 0x4b0830
mov eax, dword [edi + eax*4]
mov dword [edx], eax
inc ecx
cmp ecx, dword [esi + 0x23c]
jb 0x4b081e
jmp 0x4b084f
cmp dword [esi + 0x23c], eax
jbe 0x4b084f
mov dword [edi + eax*4], eax
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x4b0843
push edi
push dword [ebp - 8]
mov ecx, esi
call fcn.0049fa9a
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x10], ebx
jl 0x4b0c2c
xor edx, edx
xor ecx, ecx
cmp dword [esi + 0x264], edx
jbe 0x4b0899
mov edi, dword [ebp - 4]
mov eax, dword [edi + ecx*4]
cmp eax, 0xffffffff
je 0x4b088c
mov edi, dword [ebp - 0x24]
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 4]
mov dword [edi + ecx*4], eax
jmp 0x4b0890
or dword [edi + ecx*4], 0xffffffff
inc ecx
cmp ecx, dword [esi + 0x264]
jb 0x4b0873
xor eax, eax
cmp dword [esi + 0x264], edx
jbe 0x4b08b3
mov ecx, dword [ebp - 8]
or dword [ecx + eax*4], 0xffffffff
inc eax
cmp eax, dword [esi + 0x264]
jb 0x4b08a3
xor eax, eax
cmp dword [esi + 0x264], edx
jbe 0x4b08d7
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + eax*4]
cmp ecx, 0xffffffff
je 0x4b08ce
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4], eax
inc eax
cmp eax, dword [esi + 0x264]
jb 0x4b08bd
xor edi, edi
cmp dword [ebp + 0x18], edi
jne 0x4b08ef
cmp dword [ebp - 0x1c], edi
ja 0x4b08ef
cmp dword [esi + 0x240], edi
jne 0x4b0982
lea eax, [ebp - 0x14]
push eax
mov eax, dword [esi + 0x23c]
shl eax, 2
push eax
call sym.d3dx9_34.dll_D3DXCreateBuffer
mov ebx, eax
cmp ebx, edi
mov dword [ebp - 0x10], ebx
jl 0x4b0c2c
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov edx, eax
xor eax, eax
cmp dword [esi + 0x23c], edi
mov dword [ebp - 0x28], edx
jbe 0x4b0934
or dword [edx + eax*4], 0xffffffff
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x4b0927
xor eax, eax
cmp dword [ebp - 0x3c], edi
jbe 0x4b094f
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + eax*4]
cmp ecx, 0xffffffff
je 0x4b0949
mov dword [edx + ecx*4], eax
inc eax
cmp eax, dword [ebp - 0x3c]
jb 0x4b093b
cmp dword [ebp - 0x1c], edi
jbe 0x4b0985
xor ecx, ecx
cmp dword [esi + 0x23c], edi
jbe 0x4b0982
mov eax, dword [edx + ecx*4]
cmp eax, 0xffffffff
je 0x4b0979
cmp eax, dword [ebp - 0x30]
jb 0x4b0977
sub eax, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
mov eax, dword [edi + eax*4]
mov dword [edx + ecx*4], eax
xor edi, edi
inc ecx
cmp ecx, dword [esi + 0x23c]
jb 0x4b095e
cmp dword [ebp - 0x1c], edi
jne 0x4b09c4
cmp dword [esi + 0x240], edi
jbe 0x4b09c4
push edi
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
call fcn.00497144
mov ebx, eax
cmp ebx, edi
jl 0x4b0c2c
push dword [ebp - 0x18]
mov ecx, esi
push dword [ebp - 0xc]
call fcn.0049f94e
mov ebx, eax
cmp ebx, edi
mov dword [ebp - 0x10], ebx
jl 0x4b0c2c
jmp 0x4b0b77
test byte [esi + 0x218], 0x20
jne 0x4b0b77
mov eax, dword [esi + 0x234]
mov ebx, dword [esi + 0x23c]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x244]
lea edi, [esi + 0x240]
cmp dword [edi], 0
mov dword [ebp - 0x38], eax
jne 0x4b0a00
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax]
push eax
mov dword [ebp - 0x20], eax
call dword [ecx + 4]
xor eax, eax
push ebx
push dword [esi + 0x264]
mov ecx, esi
mov dword [esi + 0x234], eax
mov dword [esi + 0x23c], eax
mov dword [edi], eax
mov dword [esi + 0x244], eax
call fcn.0049bea5
mov ebx, eax
test ebx, ebx
jl 0x4b0c2c
push 0
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
call fcn.00497144
mov ebx, eax
test ebx, ebx
jl 0x4b0c2c
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push 0x810
lea edx, [ebp - 0x2c]
push edx
push 0
push 0
push eax
call dword [ecx + 0x2c]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x10], ebx
jl 0x4b0c2c
cmp dword [ebp + 0x20], 0
je 0x4b0acd
lea edi, [esi + 0xc]
push edi
push dword [ebp + 0x20]
call fcn.00496105
test eax, eax
jne 0x4b0acd
push edi
push dword [ebp + 0x20]
lea ecx, [ebp - 0x3e0]
call fcn.0049b829
push dword [ebp - 0x18]
lea ecx, [ebp - 0x3e0]
push dword [ebp - 0x2c]
call fcn.00496018
xor edi, edi
cmp dword [esi + 0x23c], edi
jbe 0x4b0b14
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + edi*4]
cmp eax, 0xffffffff
je 0x4b0ac2
push 1
push edi
push eax
lea ecx, [ebp - 0x3e0]
call fcn.00496048
inc edi
cmp edi, dword [esi + 0x23c]
jb 0x4b0aa8
jmp 0x4b0b14
and dword [ebp + 0x20], 0
cmp dword [esi + 0x23c], 0
mov ebx, dword [ebp - 0x18]
jbe 0x4b0b14
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x20]
mov ecx, dword [eax + ecx*4]
cmp ecx, 0xffffffff
je 0x4b0b06
lea edi, [esi + 0x238]
mov eax, dword [edi]
push eax
imul eax, ecx
add eax, dword [ebp - 0x2c]
push eax
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
add ebx, dword [edi]
inc dword [ebp + 0x20]
mov eax, dword [ebp + 0x20]
cmp eax, dword [esi + 0x23c]
jb 0x4b0add
mov ecx, dword [ebp - 0x38]
xor eax, eax
cmp ecx, eax
je 0x4b0b46
cmp dword [esi + 0x23c], eax
jbe 0x4b0b46
mov edx, dword [ebp - 0x28]
mov edx, dword [edx + eax*4]
mov edx, dword [ecx + edx*4]
mov ebx, dword [ebp - 0xc]
mov edi, dword [esi + 0x244]
mov edx, dword [ebx + edx*4]
mov dword [edi + eax*4], edx
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x4b0b25
xor ecx, ecx
xor edx, edx
cmp dword [esi + 0x23c], ecx
jbe 0x4b0b6c
mov eax, dword [ebp - 0xc]
lea eax, [eax + ecx*4]
cmp dword [eax], 0xffffffff
je 0x4b0b60
inc edx
jmp 0x4b0b63
or dword [eax], 0xffffffff
inc ecx
cmp ecx, dword [esi + 0x23c]
jb 0x4b0b52
mov ebx, dword [ebp - 0x10]
mov dword [esi + 0x23c], edx
xor edi, edi
cmp dword [ebp + 0x14], edi
je 0x4b0ba2
mov eax, dword [esi + 0x264]
shl eax, 2
test dword [ebp + 8], 0x80000000
push eax
je 0x4b0b94
push dword [ebp - 8]
jmp 0x4b0b97
push dword [ebp - 4]
push dword [ebp + 0x14]
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0x10], edi
je 0x4b0c15
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 0xc]
jne 0x4b0bc3
push dword [ebp - 0x48]
push eax
push dword [ebp - 8]
call fcn.0049412c
mov ebx, eax
test ebx, ebx
jl 0x4b0c2c
jmp 0x4b0c15
xor edx, edx
cmp dword [esi + 0x264], edx
jbe 0x4b0c15
mov dword [ebp + 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + edx*4]
mov ecx, dword [ebp + 8]
imul eax, eax, 0xc
add eax, dword [ebp + 0xc]
mov dword [ebp + 0x10], 3
sub eax, ecx
mov edi, dword [eax + ecx]
cmp edi, 0xffffffff
je 0x4b0bfd
mov ebx, dword [ebp - 8]
mov edi, dword [ebx + edi*4]
mov ebx, dword [ebp - 0x10]
mov dword [ecx], edi
jmp 0x4b0c00
or dword [ecx], 0xffffffff
add ecx, 4
dec dword [ebp + 0x10]
jne 0x4b0be8
add dword [ebp + 8], 0xc
inc edx
cmp edx, dword [esi + 0x264]
jb 0x4b0bd0
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x4b0c2c
mov ecx, dword [ebp - 0x14]
and dword [ebp - 0x14], 0
mov dword [eax], ecx
jmp 0x4b0c2c
mov ebx, 0x8007000e
push dword [ebp - 0xc]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push dword [ebp - 8]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push dword [ebp - 4]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x24]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x34]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x40]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov eax, dword [ebp - 0x38]
add esp, 0x18
cmp dword [esi + 0x244], eax
je 0x4b0c71
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
xor edi, edi
cmp dword [ebp - 0x18], edi
je 0x4b0c84
mov esi, dword [esi + 0x234]
mov eax, dword [esi]
push esi
call dword [eax + 0x30]
cmp dword [ebp - 0x2c], edi
mov esi, dword [ebp - 0x20]
je 0x4b0c92
mov eax, dword [esi]
push esi
call dword [eax + 0x30]
mov eax, dword [ebp - 0x14]
cmp eax, edi
je 0x4b0ca2
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x14], edi
cmp esi, edi
je 0x4b0cac
mov eax, dword [esi]
push esi
call dword [eax + 8]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x1c