Function at 0x40ae40
Capabilities:
Packed with generic packer

Disassembly:
pushal
popal
push ebp
push esp
pop ebp
push 0xfffffffffffffffe
push 0x4599d0
push 0x40e260
mov eax, dword fs:[0]
push eax
add esp, 0xffffffe4
push ebx
push esi
push edi
mov eax, dword [0x45ba3c]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
push 4
call fcn.0040e720
add esp, 4
mov dword [ebp - 4], 0
cmp dword [0x45d98c], 0
jbe 0x40aeef
mov eax, dword [0x45d98c]
sub eax, 1
cmp dword [0x45d974], eax
jne 0x40aee0
call fcn.0040c510
or eax, eax
jne 0x40aed4
push str._CrtCheckMemory__
push 0
push 0x17f
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgheap.c
push 2
call fcn.0040ffe0
add esp, 0x14
cmp eax, 1
jne 0x40aed4
int3
mov dword [0x45d974], 0
jmp 0x40aeef
mov edx, dword [0x45d974]
add edx, 1
mov dword [0x45d974], edx
mov eax, dword [0x45ba30]
mov dword [ebp - 0x28], eax
cmp dword [0x45ba34], 0xffffffff
je 0x40af0c
mov ecx, dword [ebp - 0x28]
cmp ecx, dword [0x45ba34]
jne 0x40af0c
int3
cmp dword [0x45c018], 0
je 0x40af8a
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push 0
push 1
call dword [0x45c018]
add esp, 0x1c
test eax, eax
jne 0x40af8a
cmp dword [ebp + 0x10], 0
je 0x40af65
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push str.Client_hook_allocation_failure_at_file__hs_line__d._n
push 0
push 0
push 0
push 0
call fcn.00416580
add esp, 0x1c
cmp eax, 1
jne 0x40af63
int3
jmp 0x40af85
push str.Client_hook_allocation_failure._n
push 0x44f830
push 0
push 0
push 0
push 0
call fcn.00416580
add esp, 0x18
cmp eax, 1
jne 0x40af85
int3
jmp 0x40b1ce
mov edx, dword [ebp + 0xc]
and edx, 0xffff
cmp edx, 2
je 0x40afa9
mov eax, dword [0x45ba28]
and eax, 1
jne 0x40afa9
mov dword [ebp - 0x1c], 1
cmp dword [ebp + 8], 0xffffffbc
jbe 0x40afe2
mov ecx, dword [ebp + 8]
push ecx
push str.Invalid_allocation_size:__Iu_bytes._n
push 0
push 0
push 0
push 1
call fcn.00416580
add esp, 0x18
cmp eax, 1
jne 0x40afce
int3
cmp dword [ebp + 0x18], 0
je 0x40afdd
mov eax, dword [ebp + 0x18]
mov dword [eax], 0xc
jmp 0x40b1ce
mov ecx, dword [ebp + 0xc]
and ecx, 0xffff
cmp ecx, 4
je 0x40b02a
cmp dword [ebp + 0xc], 1
je 0x40b02a
mov edx, dword [ebp + 0xc]
and edx, 0xffff
cmp edx, 2
je 0x40b02a
cmp dword [ebp + 0xc], 3
je 0x40b02a
push str.Error:_memory_allocation:_bad_memory_block_type._n
push 0x44f830
push 0
push 0
push 0
push 1
call fcn.00416580
add esp, 0x18
cmp eax, 1
jne 0x40b02a
int3
mov ecx, dword [ebp + 8]
add ecx, 0x24
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.004161f0
add esp, 4
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40b05c
cmp dword [ebp + 0x18], 0
je 0x40b057
mov eax, dword [ebp + 0x18]
mov dword [eax], 0xc
jmp 0x40b1ce
mov ecx, dword [0x45ba30]
add ecx, 1
mov dword [0x45ba30], ecx
cmp dword [ebp - 0x1c], 0
je 0x40b0ba
mov edx, dword [ebp - 0x24]
mov dword [edx], 0
mov eax, dword [ebp - 0x24]
mov dword [eax + 4], 0
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 8], 0
mov edx, dword [ebp - 0x24]
mov dword [edx + 0xc], 0xfedcbabc
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x10], ecx
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x14], 3
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x18], 0
jmp 0x40b174
or ecx, 0xffffffff
sub ecx, dword [0x45d96c]
cmp ecx, dword [ebp + 8]
jbe 0x40b0d9
mov edx, dword [0x45d96c]
add edx, dword [ebp + 8]
mov dword [0x45d96c], edx
jmp 0x40b0e3
mov dword [0x45d96c], 0xffffffff
mov eax, dword [0x45d984]
add eax, dword [ebp + 8]
mov dword [0x45d984], eax
mov ecx, dword [0x45d984]
cmp ecx, dword [0x45d978]
jbe 0x40b10a
mov edx, dword [0x45d984]
mov dword [0x45d978], edx
cmp dword [0x45d97c], 0
je 0x40b120
mov eax, dword [0x45d97c]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 4], ecx
jmp 0x40b129
mov edx, dword [ebp - 0x24]
mov dword [0x45d970], edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [0x45d97c]
mov dword [eax], ecx
mov edx, dword [ebp - 0x24]
mov dword [edx + 4], 0
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp + 0x14]
mov dword [edx + 0xc], eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp + 8]
mov dword [ecx + 0x10], edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x14], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
mov dword [edx + 0x18], eax
mov ecx, dword [ebp - 0x24]
mov dword [0x45d97c], ecx
push 4
movzx edx, byte [0x45ba38]
push edx
mov eax, dword [ebp - 0x24]
add eax, 0x1c
push eax
call fcn.00408840
add esp, 0xc
push 4
movzx ecx, byte [0x45ba38]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x24]
lea ecx, [eax + edx + 0x20]
push ecx
call fcn.00408840
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
movzx eax, byte [0x45ba3b]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, 0x20
push ecx
call fcn.00408840
add esp, 0xc
mov edx, dword [ebp - 0x24]
add edx, 0x20
mov dword [ebp - 0x20], edx
mov dword [ebp - 4], 0xfffffffe
call fcn.0040b1dc
jmp 0x40b1e7
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
push ebp
pop esp
pop ebp
ret