Function at 0x59632c
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 0x59639a
test dword [ebp + 8], 0x3fefff
jne 0x59639a
cmp dword [ebp + 0xc], eax
jne 0x596389
cmp dword [ebp + 0x10], eax
jne 0x59639a
test dword [ebp + 8], 0x40000000
je 0x5963a4
cmp dword [esi + 0x260], eax
jne 0x5963a4
mov ebx, 0x8876086c
jmp 0x596a43
or dword [ebp + 8], 0x1000000
mov edi, 0xc000000
test dword [ebp + 8], edi
mov eax, 0x2000000
je 0x5963bd
or dword [ebp + 8], eax
mov ecx, dword [ebp + 8]
and ecx, eax
mov dword [ebp - 0x10], ecx
je 0x596414
test dword [ebp + 8], 0x40000000
jne 0x596414
test dword [ebp + 8], 0x20000000
mov eax, dword [esi + 0x23c]
mov dword [ebp - 0x30], eax
jne 0x596414
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
push eax
mov ecx, esi
call fcn.0058828a
mov ebx, eax
test ebx, ebx
jl 0x596a43
cmp dword [ebp - 0x1c], 0
jbe 0x596414
test dword [ebp + 8], 0x10000000
je 0x596414
mov ebx, 0x88760b56
jmp 0x596a43
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 0x596a3e
cmp dword [ebp - 4], 0
je 0x596a3e
test eax, eax
je 0x596a3e
mov eax, dword [esi + 0x23c]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 8]
and eax, edi
mov dword [ebp - 0x4c], eax
je 0x5964c2
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 0x596a3e
test dword [ebp + 8], 0x1000000
je 0x5964f0
test dword [ebp + 8], 0x40000000
jne 0x5964f0
push dword [ebp - 0xc]
mov ecx, esi
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0057e72c
mov ebx, eax
test ebx, ebx
jl 0x596a43
jmp 0x59652b
xor eax, eax
cmp dword [esi + 0x264], eax
jbe 0x596512
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 0x596502
xor eax, eax
cmp dword [esi + 0x23c], eax
jbe 0x59652b
mov ecx, dword [ebp - 0xc]
mov dword [ecx + eax*4], eax
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x59651c
cmp dword [ebp - 0x10], 0
je 0x596557
test dword [ebp + 8], 0x40000000
jne 0x596557
push dword [ebp + 8]
mov ecx, esi
push dword [ebp - 0xc]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0057e851
mov ebx, eax
test ebx, ebx
jl 0x596a43
mov eax, dword [ebp + 8]
and eax, 0x10000000
mov dword [ebp - 0x44], eax
je 0x59657d
xor eax, eax
cmp dword [esi + 0x23c], eax
jbe 0x59657d
mov ecx, dword [ebp - 0xc]
mov dword [ecx + eax*4], eax
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x59656e
push dword [ebp - 0xc]
mov ecx, esi
push dword [ebp - 8]
call fcn.005886de
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x10], eax
jl 0x596a43
cmp dword [ebp - 0x4c], 0
je 0x5966e5
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.00594d56
mov ebx, eax
test ebx, ebx
jl 0x596a43
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 0x596a3e
cmp dword [ebp - 0x44], eax
jne 0x596643
push edi
push dword [ebp - 4]
mov ecx, esi
call fcn.0057ed40
mov ebx, eax
test ebx, ebx
jl 0x596a43
xor ecx, ecx
cmp dword [esi + 0x23c], ecx
jbe 0x596657
mov eax, dword [ebp - 0xc]
lea edx, [eax + ecx*4]
mov eax, dword [edx]
cmp eax, 0xffff
je 0x596638
mov eax, dword [edi + eax*4]
mov dword [edx], eax
inc ecx
cmp ecx, dword [esi + 0x23c]
jb 0x596624
jmp 0x596657
cmp dword [esi + 0x23c], eax
jbe 0x596657
mov dword [edi + eax*4], eax
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x59664b
push edi
push dword [ebp - 8]
mov ecx, esi
call fcn.005886de
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x10], ebx
jl 0x596a43
xor edx, edx
xor ecx, ecx
cmp dword [esi + 0x264], edx
jbe 0x5966a1
mov edi, dword [ebp - 4]
mov eax, dword [edi + ecx*4]
cmp eax, 0xffffffff
je 0x596694
mov edi, dword [ebp - 0x24]
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 4]
mov dword [edi + ecx*4], eax
jmp 0x596698
or dword [edi + ecx*4], 0xffffffff
inc ecx
cmp ecx, dword [esi + 0x264]
jb 0x59667b
xor eax, eax
cmp dword [esi + 0x264], edx
jbe 0x5966be
mov ecx, dword [ebp - 8]
mov dword [ecx + eax*4], 0xffff
inc eax
cmp eax, dword [esi + 0x264]
jb 0x5966ab
xor eax, eax
cmp dword [esi + 0x264], edx
jbe 0x5966e5
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + eax*4]
cmp ecx, 0xffff
je 0x5966dc
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4], eax
inc eax
cmp eax, dword [esi + 0x264]
jb 0x5966c8
xor edi, edi
cmp dword [ebp + 0x18], edi
jne 0x5966fd
cmp dword [ebp - 0x1c], edi
ja 0x5966fd
cmp dword [esi + 0x240], edi
jne 0x596793
lea eax, [ebp - 0x14]
push eax
mov eax, dword [esi + 0x23c]
shl eax, 2
push eax
call sym.d3dx9_35.dll_D3DXCreateBuffer
mov ebx, eax
cmp ebx, edi
mov dword [ebp - 0x10], ebx
jl 0x596a43
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 0x596742
or dword [edx + eax*4], 0xffffffff
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x596735
xor eax, eax
cmp dword [ebp - 0x3c], edi
jbe 0x596760
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + eax*4]
cmp ecx, 0xffff
je 0x59675a
mov dword [edx + ecx*4], eax
inc eax
cmp eax, dword [ebp - 0x3c]
jb 0x596749
cmp dword [ebp - 0x1c], edi
jbe 0x596796
xor ecx, ecx
cmp dword [esi + 0x23c], edi
jbe 0x596793
mov eax, dword [edx + ecx*4]
cmp eax, 0xffffffff
je 0x59678a
cmp eax, dword [ebp - 0x30]
jb 0x596788
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 0x59676f
cmp dword [ebp - 0x1c], edi
jne 0x5967d5
cmp dword [esi + 0x240], edi
jbe 0x5967d5
push edi
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
call fcn.0057d58a
mov ebx, eax
cmp ebx, edi
jl 0x596a43
push dword [ebp - 0x18]
mov ecx, esi
push dword [ebp - 0xc]
call fcn.0058856a
mov ebx, eax
cmp ebx, edi
mov dword [ebp - 0x10], ebx
jl 0x596a43
jmp 0x59698e
test byte [esi + 0x218], 0x20
jne 0x59698e
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 0x596811
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.005819e9
mov ebx, eax
test ebx, ebx
jl 0x596a43
push 0
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
call fcn.0057d58a
mov ebx, eax
test ebx, ebx
jl 0x596a43
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 0x596a43
cmp dword [ebp + 0x20], 0
je 0x5968de
lea edi, [esi + 0xc]
push edi
push dword [ebp + 0x20]
call fcn.0057cc47
test eax, eax
jne 0x5968de
push edi
push dword [ebp + 0x20]
lea ecx, [ebp - 0x3e0]
call fcn.0058301c
push dword [ebp - 0x18]
lea ecx, [ebp - 0x3e0]
push dword [ebp - 0x2c]
call fcn.0057cb5a
xor edi, edi
cmp dword [esi + 0x23c], edi
jbe 0x596925
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + edi*4]
cmp eax, 0xffffffff
je 0x5968d3
push 1
push edi
push eax
lea ecx, [ebp - 0x3e0]
call fcn.0057cb8a
inc edi
cmp edi, dword [esi + 0x23c]
jb 0x5968b9
jmp 0x596925
and dword [ebp + 0x20], 0
cmp dword [esi + 0x23c], 0
mov ebx, dword [ebp - 0x18]
jbe 0x596925
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x20]
mov ecx, dword [eax + ecx*4]
cmp ecx, 0xffffffff
je 0x596917
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 0x5968ee
mov ecx, dword [ebp - 0x38]
xor eax, eax
cmp ecx, eax
je 0x59695a
cmp dword [esi + 0x23c], eax
jbe 0x59695a
mov edx, dword [ebp - 0x28]
mov edx, dword [edx + eax*4]
movzx edx, word [ecx + edx*2]
mov ebx, dword [ebp - 0xc]
mov edi, dword [esi + 0x244]
mov dx, word [ebx + edx*4]
mov word [edi + eax*2], dx
inc eax
cmp eax, dword [esi + 0x23c]
jb 0x596936
xor ecx, ecx
xor edx, edx
cmp dword [esi + 0x23c], ecx
jbe 0x596983
mov eax, dword [ebp - 0xc]
lea eax, [eax + ecx*4]
cmp dword [eax], 0xffff
je 0x596977
inc edx
jmp 0x59697a
or dword [eax], 0xffffffff
inc ecx
cmp ecx, dword [esi + 0x23c]
jb 0x596966
mov ebx, dword [ebp - 0x10]
mov dword [esi + 0x23c], edx
xor edi, edi
cmp dword [ebp + 0x14], edi
je 0x5969b9
mov eax, dword [esi + 0x264]
shl eax, 2
test dword [ebp + 8], 0x80000000
push eax
je 0x5969ab
push dword [ebp - 8]
jmp 0x5969ae
push dword [ebp - 4]
push dword [ebp + 0x14]
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0x10], edi
je 0x596a2c
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 0xc]
jne 0x5969da
push dword [ebp - 0x48]
push eax
push dword [ebp - 8]
call fcn.0057a90f
mov ebx, eax
test ebx, ebx
jl 0x596a43
jmp 0x596a2c
xor edx, edx
cmp dword [esi + 0x264], edx
jbe 0x596a2c
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 0x596a14
mov ebx, dword [ebp - 8]
mov edi, dword [ebx + edi*4]
mov ebx, dword [ebp - 0x10]
mov dword [ecx], edi
jmp 0x596a17
or dword [ecx], 0xffffffff
add ecx, 4
dec dword [ebp + 0x10]
jne 0x5969ff
add dword [ebp + 8], 0xc
inc edx
cmp edx, dword [esi + 0x264]
jb 0x5969e7
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x596a43
mov ecx, dword [ebp - 0x14]
and dword [ebp - 0x14], 0
mov dword [eax], ecx
jmp 0x596a43
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 0x596a88
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
xor edi, edi
cmp dword [ebp - 0x18], edi
je 0x596a9b
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 0x596aa9
mov eax, dword [esi]
push esi
call dword [eax + 0x30]
mov eax, dword [ebp - 0x14]
cmp eax, edi
je 0x596ab9
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x14], edi
cmp esi, edi
je 0x596ac3
mov eax, dword [esi]
push esi
call dword [eax + 8]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x1c