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

Disassembly:
sub esp, 0xa4
push ebx
mov ebx, dword [esp + 0xb0]
push ebp
mov ebp, dword [esp + 0xb0]
cmp ebp, ebx
push esi
push edi
je 0x48aa5d
int3
cmp dword [esp + 0xc0], 0x20
sete al
mov byte [esp + 0x13], al
test al, al
mov eax, dword [0x4cdd00]
jne 0x48aa7a
mov eax, dword [0x4cdd04]
imul eax, eax, 0x38
add eax, 0x4cdd08
mov ecx, eax
mov eax, dword [esp + 0xc8]
test eax, eax
mov dword [esp + 0x1c], ecx
je 0x48aa95
mov dword [eax], ecx
mov al, byte [esp + 0xd0]
test al, al
mov eax, dword [0x4cdcfc]
mov esi, ebp
mov edi, ebx
jne 0x48aac7
cmp eax, 1
je 0x48aabd
test eax, eax
je 0x48aabd
cmp eax, 2
jne 0x48aac7
sar esi, 1
sar edi, 1
jmp 0x48aade
mov esi, ebp
mov edi, ebx
sar esi, 2
sar edi, 2
test eax, eax
jne 0x48aade
mov al, byte [esp + 0xd8]
test al, al
jne 0x48aade
mov byte [esp + 0xd4], 0
mov eax, dword [0x4cdcf0]
mov ecx, dword [0x4e64d4]
imul eax, eax, 0x50c
lea edx, [eax + ecx]
mov ecx, dword [edx + 0x468]
test cl, 2
je 0x48ab1f
mov eax, 1
cmp esi, eax
jle 0x48ab0c
shl eax, 1
cmp eax, esi
jl 0x48ab06
mov esi, eax
mov eax, 1
cmp edi, eax
jle 0x48ab1d
shl eax, 1
cmp eax, edi
jl 0x48ab17
mov edi, eax
test cl, 0x20
je 0x48ab30
cmp esi, edi
jle 0x48ab2c
mov edi, esi
jmp 0x48ab30
jge 0x48ab30
mov esi, edi
mov eax, dword [edx + 0x484]
cmp esi, eax
jl 0x48ab3c
mov esi, eax
mov eax, dword [edx + 0x488]
cmp edi, eax
jl 0x48ab48
mov edi, eax
call fcn.00486180
mov edx, dword [eax]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx]
push 1
push ecx
xor ecx, ecx
cmp byte [esp + 0xe0], cl
push 0
sete cl
push ecx
push esi
push eax
call dword [edx + 0x58]
test eax, eax
jge 0x48ab93
mov edx, dword [esp + 0xc0]
push eax
push edx
push edi
push esi
push str.Failed_to_create_cube_texture___d_x__d_x__d_.__Return_value___d_n
call fcn.004777d0
add esp, 0x14
call dword [sym.imp.KERNEL32.dll_DebugBreak]
mov edi, dword [esp + 0xc4]
test edi, edi
je 0x48b163
mov eax, ebp
imul eax, ebx
imul eax, dword [esp + 0xc0]
mov ebx, dword [esp + 0xcc]
sar eax, 3
test ebx, ebx
mov esi, edi
mov dword [esp + 0x68], esi
mov dword [esp + 0x90], eax
je 0x48abf5
lea eax, [eax + eax*2]
shl eax, 1
push eax
mov dword [esp + 0x8c], eax
call fcn.0049b51f
mov esi, eax
push ebx
push edi
lea eax, [esp + 0x94]
push eax
push esi
mov dword [esp + 0x7c], esi
call fcn.00498230
add esp, 0x14
mov dword [esp + 0x4c], 0
mov dword [esp + 0x30], esi
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
push eax
mov dword [esp + 0x48], 0
call dword [ecx + 0x34]
test eax, eax
jbe 0x48b128
jmp 0x48ac20
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x54]
push ecx
push eax
call dword [edx + 0x3c]
xor edi, edi
cmp eax, edi
jge 0x48ac57
push eax
push str.Failed_to_get_surface_level.__Return_value___d_n
call fcn.004777d0
mov esi, dword [sym.imp.KERNEL32.dll_DebugBreak]
add esp, 8
call esi
jmp 0x48ac5d
mov esi, dword [sym.imp.KERNEL32.dll_DebugBreak]
mov eax, dword [esp + 0x34]
mov edx, dword [eax]
lea ecx, [esp + 0x94]
push ecx
push eax
call dword [edx + 0x20]
cmp eax, edi
jge 0x48ac83
push eax
push str.Failed_to_get_surface_details.__Return_value___d_n
call fcn.004777d0
add esp, 8
call esi
mov eax, dword [esp + 0x34]
mov edx, dword [eax]
push edi
push edi
lea ecx, [esp + 0x7c]
push ecx
push eax
call dword [edx + 0x24]
cmp eax, edi
jge 0x48aca8
push eax
push str.Failed_to_lock_surface.__Return_value___d_n
call fcn.004777d0
add esp, 8
call esi
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x78]
mov ebx, dword [eax + 0x14]
mov esi, dword [eax + 0x20]
mov dword [esp + 0x14], edx
mov edx, dword [eax + 8]
mov ebp, dword [esp + 0x30]
mov ecx, 8
sub ecx, edx
mov edx, dword [eax + 0x1c]
mov dword [esp + 0x38], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x54], ecx
mov ecx, 8
sub ecx, ebx
mov dword [esp + 0x48], ecx
mov ecx, 8
sub ecx, esi
mov esi, dword [esp + 0xb0]
mov dword [esp + 0x40], ecx
mov ecx, dword [eax + 0x28]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x7c], edx
mov edx, dword [eax + 0x2c]
mov ecx, 8
sub ecx, edx
mov edx, dword [eax + 0x34]
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0xac]
cmp eax, ecx
mov dword [esp + 0x70], edx
jne 0x48ae7b
cmp dword [esp + 0xbc], esi
jne 0x48ae7b
cmp esi, edi
mov dword [esp + 0x20], edi
jle 0x48b0e1
jmp 0x48ad50
test ecx, ecx
mov dword [esp + 0x24], 0
jle 0x48ae48
movzx edi, byte [ebp]
movzx esi, byte [ebp + 1]
mov cl, byte [esp + 0x13]
inc ebp
movzx edx, byte [ebp + 1]
inc ebp
inc ebp
test cl, cl
mov eax, 0xff
je 0x48ad81
movzx eax, byte [ebp]
inc ebp
mov ecx, dword [esp + 0x28]
test ecx, ecx
jge 0x48ad9c
add ecx, 8
mov ebx, eax
sar ebx, cl
mov ecx, dword [esp + 0x28]
neg ecx
shl eax, cl
or eax, ebx
jmp 0x48ad9e
sar eax, cl
mov ecx, dword [esp + 0x38]
test ecx, ecx
jge 0x48adb9
add ecx, 8
mov ebx, edi
sar ebx, cl
mov ecx, dword [esp + 0x38]
neg ecx
shl edi, cl
or edi, ebx
jmp 0x48adbb
sar edi, cl
mov ecx, dword [esp + 0x48]
test ecx, ecx
jge 0x48add6
add ecx, 8
mov ebx, esi
sar ebx, cl
mov ecx, dword [esp + 0x48]
neg ecx
shl esi, cl
or esi, ebx
jmp 0x48add8
sar esi, cl
mov ecx, dword [esp + 0x40]
test ecx, ecx
jge 0x48adf3
add ecx, 8
mov ebx, edx
sar ebx, cl
mov ecx, dword [esp + 0x40]
neg ecx
shl edx, cl
or edx, ebx
jmp 0x48adf5
sar edx, cl
mov ecx, dword [esp + 0x70]
shl eax, cl
mov ecx, dword [esp + 0x6c]
shl edx, cl
mov ecx, dword [esp + 0x7c]
shl esi, cl
mov ecx, dword [esp + 0x54]
or eax, edx
shl edi, cl
mov ecx, dword [esp + 0x14]
or eax, esi
or eax, edi
mov dword [ecx], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x24]
sar edx, 3
add ecx, edx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0xac]
inc eax
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x48ad60
mov esi, dword [esp + 0xb0]
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x74]
imul edx, ecx
mov ebx, dword [esp + 0x14]
sar edx, 3
sub eax, edx
add ebx, eax
mov eax, dword [esp + 0x20]
inc eax
cmp eax, esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], eax
jl 0x48ad50
jmp 0x48b0e1
cmp esi, edi
mov dword [esp + 0x60], edi
jle 0x48b0e1
mov dword [esp + 0x24], 0
nop
mov edi, dword [esp + 0x24]
mov eax, edi
cdq
idiv esi
mov edx, dword [esp + 0xbc]
mov dword [esp + 0x84], eax
lea eax, [edi + edx]
cdq
idiv esi
mov dword [esp + 0x50], eax
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x58], eax
jle 0x48b0a2
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x20], eax
mov edi, edi
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x5c], edx
cdq
idiv ecx
mov ecx, dword [esp + 0x84]
mov ebp, dword [esp + 0x50]
xor esi, esi
xor edi, edi
xor ebx, ebx
mov dword [esp + 0x2c], esi
mov edx, eax
xor eax, eax
cmp ecx, ebp
mov dword [esp + 0x3c], edx
jge 0x48afac
imul ecx, dword [esp + 0xb8]
add ecx, dword [esp + 0x5c]
mov ebp, dword [esp + 0xc0]
sar ebp, 3
imul ecx, ebp
mov ebp, dword [esp + 0x30]
add ecx, ebp
mov ebp, dword [esp + 0x84]
mov dword [esp + 0x8c], ecx
mov ecx, dword [esp + 0x50]
sub ecx, ebp
mov dword [esp + 0x64], ecx
jmp 0x48af40
mov ebp, dword [esp + 0x5c]
cmp ebp, edx
mov ecx, dword [esp + 0x8c]
jge 0x48afa6
sub edx, ebp
mov dword [esp + 0x80], edx
add ebx, edx
lea ebx, [ebx]
movzx ebp, byte [ecx]
add eax, ebp
movzx ebp, byte [ecx + 1]
inc ecx
add edi, ebp
movzx ebp, byte [ecx + 1]
inc ecx
add esi, ebp
mov ebp, dword [esp + 0x2c]
inc ecx
cmp byte [esp + 0x13], 0
je 0x48af8e
movzx edx, byte [ecx]
add ebp, edx
mov edx, dword [esp + 0x80]
inc ecx
jmp 0x48af94
add ebp, 0xff
dec edx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x80], edx
jne 0x48af60
mov edx, dword [esp + 0x3c]
dec dword [esp + 0x64]
jne 0x48af40
cdq
idiv ebx
mov ecx, dword [esp + 0x28]
mov ebp, eax
mov eax, edi
cdq
idiv ebx
mov edi, eax
mov eax, esi
cdq
idiv ebx
mov esi, eax
mov eax, dword [esp + 0x2c]
cdq
idiv ebx
test ecx, ecx
jge 0x48afe1
mov edx, ecx
mov ebx, eax
lea ecx, [edx + 8]
sar ebx, cl
mov ecx, edx
neg ecx
shl eax, cl
or eax, ebx
jmp 0x48afe7
mov ecx, dword [esp + 0x28]
sar eax, cl
mov edx, dword [esp + 0x38]
test edx, edx
jge 0x48b000
mov ebx, ebp
lea ecx, [edx + 8]
sar ebx, cl
mov ecx, edx
neg ecx
shl ebp, cl
or ebp, ebx
jmp 0x48b004
mov ecx, edx
sar ebp, cl
mov edx, dword [esp + 0x48]
test edx, edx
jge 0x48b01d
mov ebx, edi
lea ecx, [edx + 8]
sar ebx, cl
mov ecx, edx
neg ecx
shl edi, cl
or edi, ebx
jmp 0x48b021
mov ecx, edx
sar edi, cl
mov edx, dword [esp + 0x40]
test edx, edx
jge 0x48b03a
mov ebx, esi
lea ecx, [edx + 8]
sar ebx, cl
mov ecx, edx
neg ecx
shl esi, cl
or esi, ebx
jmp 0x48b03e
mov ecx, edx
sar esi, cl
mov ecx, dword [esp + 0x70]
shl eax, cl
mov ecx, dword [esp + 0x6c]
shl esi, cl
mov ecx, dword [esp + 0x7c]
shl edi, cl
mov ecx, dword [esp + 0x54]
or eax, esi
mov esi, dword [esp + 0x20]
shl ebp, cl
mov ecx, dword [esp + 0x14]
or eax, edi
or eax, ebp
mov dword [ecx], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x58]
sar edx, 3
add ecx, edx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0xb8]
add esi, ecx
mov ecx, dword [esp + 0xac]
inc eax
cmp eax, ecx
mov dword [esp + 0x58], eax
mov dword [esp + 0x20], esi
jl 0x48aed0
mov esi, dword [esp + 0xb0]
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 4]
mov edx, dword [esp + 0x74]
imul eax, ecx
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
sar eax, 3
sub edx, eax
mov eax, dword [esp + 0x60]
add ebp, edx
mov edx, dword [esp + 0xbc]
inc eax
add edi, edx
cmp eax, esi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x60], eax
mov dword [esp + 0x24], edi
jl 0x48ae90
mov eax, dword [esp + 0x34]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
test eax, eax
jge 0x48b103
push eax
push str.Failed_to_unlock_surface.__Return_value___d_n
call fcn.004777d0
add esp, 8
call dword [sym.imp.KERNEL32.dll_DebugBreak]
mov eax, dword [esp + 0x34]
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov esi, dword [esp + 0x44]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
inc esi
push eax
mov dword [esp + 0x48], esi
call dword [ecx + 0x34]
cmp esi, eax
jb 0x48ac20
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x90]
inc eax
add esi, edx
cmp eax, 6
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], esi
jb 0x48ac01
mov eax, dword [esp + 0xcc]
test eax, eax
je 0x48b163
mov eax, dword [esp + 0x68]
push eax
call fcn.0049b47d
add esp, 4
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret