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

Disassembly:
push 0xa4
mov eax, 0x56200d
call fcn.005611e0
mov edi, ecx
and dword [ebp - 4], 0
mov ebx, dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
push 0x168
call ebx
mov esi, eax
pop ecx
mov dword [ebp - 0x90], esi
mov byte [ebp - 4], 1
test esi, esi
je 0x405ce3
sub esp, 0x18
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.0040772e
mov ecx, esi
call fcn.00414653
jmp 0x405ce5
xor eax, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
and dword [ebp - 0x2c], 0
and dword [ebp - 0x28], 0
push eax
call fcn.0040c764
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x24]
push dword [edi + 0x1c]
and dword [ebp - 0x24], 0
push dword [edi + 0x18]
and dword [ebp - 0x20], 0
call fcn.0040c7e5
mov esi, dword [ebp - 0x2c]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
lea ecx, [esi + 0x40]
call fcn.0040c7e5
lea ecx, [ebp - 0x24]
call fcn.00407a1d
push ecx
push ecx
lea eax, [edi + 0x44]
mov ecx, esp
push eax
call fcn.00402dd4
push ecx
push ecx
lea eax, [edi + 0x3c]
mov ecx, esp
push eax
call fcn.00402dd4
push ecx
push ecx
lea eax, [edi + 0x20]
mov ecx, esp
push eax
call fcn.00402dd4
push ecx
push ecx
lea eax, [edi + 0x10]
mov ecx, esp
push eax
call fcn.00402dd4
push ecx
push ecx
lea eax, [edi + 8]
mov ecx, esp
push eax
call fcn.00402dd4
push dword [edi + 0x94]
mov ecx, esi
call fcn.0041499f
and dword [ebp - 0x7c], 0
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x1c], eax
push 0x14
mov byte [ebp - 4], 3
call ebx
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x405d9d
call dword [sym.imp.MSVCP120.dll_void___cdecl_std::_Xbad_alloc_void_]
mov al, byte [ebp - 0x20]
mov dword [ecx], 0x57eec8
mov dword [ecx + 4], 0x406212
mov byte [ecx + 8], al
mov dword [ecx + 0xc], edi
mov dword [ebp - 0x7c], ecx
lea eax, [esi + 0x78]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x8c]
cmp eax, ecx
je 0x405ddd
mov ecx, eax
call fcn.0040276b
lea eax, [ebp - 0x8c]
push eax
lea ecx, [esi + 0x78]
call fcn.00402f3d
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 2
call fcn.0040276b
lea ecx, [ebp - 0x8c]
call fcn.0040276b
and dword [ebp - 0x64], 0
lea eax, [ebp - 0x74]
mov dword [ebp - 0x1c], eax
push 0x14
mov byte [ebp - 4], 5
call ebx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x405d97
mov al, byte [ebp - 0x20]
mov dword [ecx], 0x57ee58
mov dword [ecx + 4], 0x406200
mov byte [ecx + 8], al
mov dword [ecx + 0xc], edi
mov dword [ebp - 0x64], ecx
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 6
push eax
lea ecx, [esi + 0x90]
call fcn.004026df
mov ecx, dword [esi + 0xa0]
mov byte [ebp - 0x14], 0
test ecx, ecx
jne 0x405e50
call dword [sym.imp.MSVCP120.dll_void___cdecl_std::_Xbad_function_call_void_]
mov eax, dword [ecx]
lea edx, [ebp - 0x14]
push edx
call dword [eax + 8]
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x64]
test ecx, ecx
je 0x405e75
mov edx, dword [ecx]
lea eax, [ebp - 0x74]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
and dword [ebp - 0x34], 0
lea eax, [ebp - 0x44]
mov dword [ebp - 0x1c], eax
push 0x14
mov byte [ebp - 4], 7
call ebx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x405d97
mov al, byte [ebp - 0x20]
mov dword [ecx], 0x57efac
mov dword [ecx + 4], 0x406b8c
mov byte [ecx + 8], al
mov dword [ecx + 0xc], edi
mov dword [ebp - 0x34], ecx
mov byte [ebp - 4], 8
lea eax, [ebp - 0x44]
mov ebx, dword [ebp - 0x2c]
lea esi, [ebx + 0xd8]
cmp esi, eax
je 0x405ee8
mov ecx, esi
call fcn.0040276b
mov ecx, dword [ebp - 0x34]
test ecx, ecx
jne 0x405ed2
and dword [esi + 0x10], ecx
jmp 0x405ee5
lea eax, [ebp - 0x44]
cmp ecx, eax
mov eax, dword [ecx]
jne 0x405ede
push esi
jmp 0x405ee0
push 0
call dword [eax]
mov dword [esi + 0x10], eax
mov ecx, dword [ebp - 0x34]
mov byte [ebp - 4], 2
test ecx, ecx
je 0x405f01
mov edx, dword [ecx]
lea eax, [ebp - 0x44]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x5c], 0x57f0b4
mov dword [ebp - 0x58], 0x406dbe
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x4c], ecx
lea esi, [ebx + 0xf0]
mov byte [ebp - 4], 0xa
mov eax, ecx
cmp esi, eax
je 0x405f3d
mov ecx, esi
call fcn.0040276b
lea eax, [ebp - 0x5c]
mov ecx, esi
push eax
call fcn.00402f3d
mov ecx, dword [ebp - 0x4c]
mov byte [ebp - 4], 2
test ecx, ecx
je 0x405f56
mov edx, dword [ecx]
lea eax, [ebp - 0x5c]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
lea eax, [ebp - 0x20]
mov ecx, edi
push eax
call fcn.00405122
push ecx
push eax
mov edx, 0x4076c8
lea ecx, [ebp - 0x6c]
call fcn.0040a67d
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 0xc
call fcn.0040a6a1
lea eax, [ebp - 0xac]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebx + 0x150]
call fcn.004026df
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x9c]
test ecx, ecx
je 0x405fc1
mov edx, dword [ecx]
lea eax, [ebp - 0xac]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
and dword [ebp - 0x9c], 0
lea ecx, [ebp - 0x64]
call fcn.00407a1d
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
call fcn.00407a1d
lea esi, [edi + 0x30]
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x2c]
cmp ecx, eax
jae 0x406008
cmp dword [esi], ecx
ja 0x406008
mov edi, ecx
sub edi, dword [esi]
sar edi, 3
cmp eax, dword [esi + 8]
jne 0x405ffa
push ecx
mov ecx, esi
call fcn.004090f4
mov eax, dword [esi]
mov ecx, dword [esi + 4]
lea eax, [eax + edi*8]
test ecx, ecx
je 0x406025
jmp 0x40601f
cmp eax, dword [esi + 8]
jne 0x406015
push ecx
mov ecx, esi
call fcn.004090f4
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x406025
lea eax, [ebp - 0x2c]
push eax
call fcn.004030d2
add dword [esi + 4], 8
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x406039
call fcn.0040283d
push 0
push 1
lea ecx, [ebp + 8]
call fcn.00401d3f
call fcn.005611ae
ret 0x18