Function at 0x402380
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x410539
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x224
mov al, byte [esp + 3]
push ebx
push ebp
mov ebp, ecx
push esi
xor ebx, ebx
lea esi, [ebp + 4]
push edi
mov dword [esp + 0x14], ebp
mov byte [esi], al
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
lea ecx, [esp + 0x2c]
push ebx
push ecx
push str.AIEngine
mov dword [esp + 0x248], ebx
mov dword [ebp], 0x411444
call fcn.0040c960
push 0x415434
lea edx, [esp + 0x3c]
push 2
lea eax, [esp + 0x30]
push edx
push eax
call fcn.0040c9b0
add esp, 0x1c
mov edi, eax
cmp esi, edi
mov byte [esp + 0x23c], 1
je 0x402553
mov ebp, dword [edi + 4]
cmp ebp, ebx
jne 0x40240d
xor edx, edx
jmp 0x402415
mov edx, dword [edi + 8]
sub edx, ebp
sar edx, 4
mov ecx, dword [esi + 4]
cmp ecx, ebx
jne 0x402420
xor eax, eax
jmp 0x402428
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 4
cmp edx, eax
ja 0x4024a3
mov eax, dword [edi + 8]
mov ebx, ecx
cmp ebp, eax
mov dword [esp + 0x18], eax
je 0x40245b
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov edx, dword [ecx]
mov ecx, ebx
push edx
push 0
push ebp
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x18]
add ebp, 0x10
add ebx, 0x10
cmp ebp, eax
jne 0x402439
mov ebp, dword [esi + 8]
cmp ebx, ebp
je 0x402472
push 0
mov ecx, ebx
call fcn.004035a0
add ebx, 0x10
cmp ebx, ebp
jne 0x402462
mov eax, dword [edi + 4]
test eax, eax
jne 0x40248b
mov eax, dword [esi + 4]
xor edi, edi
shl edi, 4
add edi, eax
mov dword [esi + 8], edi
jmp 0x40254d
mov edi, dword [edi + 8]
sub edi, eax
mov eax, dword [esi + 4]
sar edi, 4
shl edi, 4
add edi, eax
mov dword [esi + 8], edi
jmp 0x40254d
cmp ebp, ebx
je 0x4024af
mov ebx, dword [edi + 8]
sub ebx, ebp
sar ebx, 4
mov ecx, esi
call fcn.00403200
cmp ebx, eax
ja 0x402500
mov ebx, dword [edi + 4]
mov ecx, esi
call fcn.00403180
mov ecx, dword [esi + 4]
mov ebp, eax
mov eax, dword [edi + 4]
push ecx
shl ebp, 4
add ebp, ebx
push ebp
push eax
call fcn.004032b0
mov edx, dword [esi + 8]
mov eax, dword [edi + 8]
add esp, 0xc
mov ecx, esi
push edx
push eax
push ebp
call fcn.00403270
mov ecx, edi
call fcn.00403180
mov ecx, dword [esi + 4]
shl eax, 4
add eax, ecx
mov dword [esi + 8], eax
jmp 0x40254d
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push eax
push ecx
mov ecx, esi
call fcn.00403220
mov eax, dword [esi + 4]
push eax
call fcn.00410178
add esp, 4
mov ecx, edi
call fcn.00403180
test eax, eax
jge 0x402528
xor eax, eax
shl eax, 4
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esi + 4], eax
mov ecx, dword [edi + 8]
mov edi, dword [edi + 4]
push eax
push ecx
push edi
mov ecx, esi
call fcn.00403270
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov ebp, dword [esp + 0x14]
xor ebx, ebx
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
cmp esi, edi
mov byte [esp + 0x23c], 0
je 0x40257c
push 1
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
add esi, 0x10
cmp esi, edi
jne 0x402567
mov esi, dword [esp + 0x20]
push esi
call fcn.00410178
mov ecx, dword [esp + 0x238]
add esp, 4
mov dword [ebp + 0x14], ebx
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x230
ret