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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100c36cb
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
push ebx
push esi
push edi
mov eax, dword [0x1010f048]
xor eax, esp
push eax
lea eax, [esp + 0xe8]
mov dword fs:[0], eax
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0xf0], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
lea eax, [esp + 0x58]
push eax
mov ebx, ecx
mov byte [esp + 0xf4], 1
call fcn.100519cf
pop ecx
lea ecx, [esp + 0x58]
call fcn.10051bde
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x5c]
xor ebx, ebx
xor esi, esi
cmp eax, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
je 0x10051e50
mov eax, dword [esp + 0x18]
lea edi, [esp + 0x80]
call fcn.10051c98
cmp dword [esp + 0x34], ebx
mov ecx, dword [eax]
mov dword [esp + 0x98], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 0x9c], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x94], esi
mov dword [esp + 0xa0], ecx
mov dword [esp + 0xa4], eax
je 0x10051e27
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x34]
push 0x14
cdq
pop ecx
idiv ecx
push 0x14
pop edi
mov ecx, eax
mov eax, dword [esp + 0x3c]
sub eax, dword [esp + 0x34]
cdq
idiv edi
cmp ecx, eax
jae 0x10051e27
push 1
push dword [esp + 0x3c]
lea ecx, [esp + 0x9c]
call fcn.10052458
mov dword [esp + 0x38], eax
jmp 0x10051e3c
lea eax, [esp + 0x94]
push eax
push dword [esp + 0x3c]
lea ecx, [esp + 0x38]
call fcn.10052a00
add dword [esp + 0x18], 8
mov eax, dword [esp + 0x18]
inc esi
cmp eax, dword [esp + 0x14]
jne 0x10051da9
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov edi, dword [ebp + 8]
mov byte [esp + 0xf0], 3
mov ecx, dword [edi + 4]
cmp ecx, ebx
jne 0x10051e80
mov dword [esp + 0x1c], ebx
jmp 0x10051e8c
mov eax, dword [edi + 8]
sub eax, ecx
sar eax, 2
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
jbe 0x10051fcd
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x18]
mov ebx, dword [eax + ecx*4]
lea esi, [ebx + 0xa0]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xcc]
test al, al
je 0x10051fb9
mov eax, dword [esp + 0x60]
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x14], eax
mov eax, esi
lea esi, [esp + 0xdc]
call fcn.1005186d
cmp edi, dword [esp + 0x14]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], eax
mov esi, edi
je 0x10051f03
mov ecx, esi
lea edx, [esp + 0x50]
call fcn.1005188b
test al, al
jne 0x10051f03
add esi, 8
cmp esi, dword [esp + 0x14]
jne 0x10051eeb
and dword [esp + 0x14], 0
cmp esi, dword [esp + 0x60]
je 0x10051f21
sub esi, dword [esp + 0x5c]
sar esi, 3
inc esi
push esi
call fcn.10052c44
pop ecx
mov dword [esp + 0x14], eax
and dword [esp + 0x68], 0
lea eax, [esp + 0x68]
push eax
lea edi, [esp + 0x44]
mov dword [esp + 0x70], ebx
call fcn.10052335
mov eax, dword [ebx]
lea ecx, [esp + 0x94]
push ecx
mov ecx, ebx
call dword [eax + 0x58]
xor eax, eax
cmp dword [esp + 0x44], eax
je 0x10051f5a
mov eax, dword [esp + 0x48]
sub eax, dword [esp + 0x44]
sar eax, 3
dec eax
mov dword [esp + 0xc0], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0xc4], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0xd0], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xd4], eax
lea eax, [esp + 0xc0]
push eax
lea esi, [esp + 0x24]
call fcn.1005237d
mov edi, dword [ebp + 8]
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x1c]
jb 0x10051e9a
xor ebx, ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov byte [esp + 0xf0], 4
mov ecx, dword [0x10117aa8]
xor eax, eax
lea edi, [esp + 0x14]
stosb byte es:[edi], al
mov eax, dword [ecx]
call dword [eax]
mov ecx, eax
add eax, 0x4c
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x18]
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.10052c58
mov ecx, dword [0x10117aa8]
xor eax, eax
lea edi, [esp + 0x24]
stosb byte es:[edi], al
mov eax, dword [ecx]
add esp, 0x10
call dword [eax]
mov ecx, eax
add eax, 0x4c
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x18]
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.10052cdd
mov esi, dword [esp + 0x84]
mov edi, dword [esp + 0x88]
add esp, 0x10
jmp 0x10052073
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x60]
push eax
push dword [esi]
call fcn.100518ba
add esp, 0x10
add esi, 4
cmp esi, edi
jne 0x10052057
mov byte [esp + 0xf0], 3
cmp dword [esp + 0x74], ebx
je 0x1005208f
push dword [esp + 0x74]
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [esp + 0x44], ebx
jne 0x10052099
xor esi, esi
jmp 0x100520a4
mov esi, dword [esp + 0x48]
sub esi, dword [esp + 0x44]
sar esi, 3
lea eax, [esp + 0x20]
call fcn.10019a38
cmp esi, eax
sete al
test al, al
jne 0x100520be
push 3
pop eax
jmp fcn.1000bbb8
test byte [0x1011bf6c], 1
jne 0x100520ed
or dword [0x1011bf6c], 1
mov esi, str.float:occlusion.threshold
mov edi, 0x1011bf68
mov byte [esp + 0xf0], 5
call fcn.100a5f7c
mov byte [esp + 0xf0], 3
mov esi, dword [0x10117aa8]
call fcn.1000d4d4
push dword [0x1011bf68]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x24]
fstp dword [esp + 0x14]
mov dword [esp + 0x80], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
lea eax, [esp + 0x80]
push eax
mov byte [esp + 0xf4], 6
mov eax, dword [esp + 0x18]
push ecx
mov dword [esp], eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.10019746
mov esi, dword [ebp + 0xc]
add esp, 0x10
call fcn.1000f71c
lea eax, [esp + 0x20]
call fcn.10019a38
cmp eax, ebx
mov dword [esp + 0x50], eax
mov dword [esp + 0x18], ebx
jbe 0x1005220e
xor esi, esi
push dword [esp + 0x18]
lea edi, [esp + 0xe0]
lea eax, [esp + 0x84]
call fcn.10019a53
mov ecx, dword [eax + 4]
mov edx, dword [eax]
xor edi, edi
inc edi
shl edi, cl
test dword [edx], edi
jne 0x100521c8
mov eax, dword [esp + 0x24]
add eax, esi
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x14], eax
fld dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
fmul dword [esp + 0x1c]
fstp dword [esp + 0x68]
fld dword [esp + 0x68]
fcomp dword [0x100c8374]
fnstsw ax
test ah, 5
jp 0x100521f9
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x44]
add eax, esi
cmp edx, ebx
mov eax, dword [eax]
je 0x10052275
mov ecx, dword [esp + 0x48]
sub ecx, edx
sar ecx, 3
cmp ecx, eax
jbe 0x10052275
mov edi, dword [ebp + 0xc]
lea eax, [edx + eax*8]
push eax
call fcn.10052335
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
add esi, 0x18
cmp eax, dword [esp + 0x50]
jb 0x10052172
lea esi, [esp + 0x84]
mov dword [esp + 0x80], ebx
call fcn.1001006e
lea esi, [esp + 0x40]
call fcn.1001006e
cmp dword [esp + 0x24], ebx
je 0x1005223a
push dword [esp + 0x24]
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
pop ecx
lea esi, [esp + 0x58]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call fcn.1001006e
cmp dword [esp + 0x34], ebx
je 0x1005225f
push dword [esp + 0x34]
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
pop ecx
mov ecx, dword [esp + 0xe8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.invalid_vector_T__subscript
lea ecx, [esp + 0xc4]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea eax, [esp + 0xc0]
push eax
lea eax, [esp + 0x98]
push eax
mov byte [esp + 0xf8], 7
call fcn.10002ef5
push 0x100f09b4
lea eax, [esp + 0x98]
push eax
mov dword [esp + 0x9c], vtable.std::out_of_range.0
call sub.MSVCR80.dll__CxxThrowException
int3