Function at 0x40b410
Capabilities:
Packed with generic packer

Disassembly:
pushal
popal
push ebp
push esp
pop ebp
sub esp, 0x18
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], 0
jne 0x40b44a
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.0040acf0
add esp, 0x10
jmp 0x40ba05
cmp dword [ebp + 0x1c], 0
je 0x40b46d
cmp dword [ebp - 4], 0
jne 0x40b46d
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040bc20
add esp, 8
sub eax, eax
jmp 0x40ba05
cmp dword [0x45d98c], 0
jbe 0x40b4cc
mov edx, dword [0x45d98c]
sub edx, 1
cmp dword [0x45d974], edx
jne 0x40b4bd
call fcn.0040c510
test eax, eax
jne 0x40b4b1
push str._CrtCheckMemory__
push 0
push 0x2d2
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgheap.c
push 2
call fcn.0040ffe0
add esp, 0x14
cmp eax, 1
jne 0x40b4b1
int3
mov dword [0x45d974], 0
jmp 0x40b4cc
mov ecx, dword [0x45d974]
add ecx, 1
mov dword [0x45d974], ecx
mov edx, dword [0x45ba30]
mov dword [ebp - 0x18], edx
cmp dword [0x45ba34], 0xffffffff
je 0x40b4ea
mov eax, dword [ebp - 0x18]
cmp eax, dword [0x45ba34]
jne 0x40b4ea
int3
cmp dword [0x45c018], 0
je 0x40b56c
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 8]
push eax
push 2
call dword [0x45c018]
add esp, 0x1c
test eax, eax
jne 0x40b56c
cmp dword [ebp + 0x14], 0
je 0x40b545
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
push str.Client_hook_re_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 0x40b543
int3
jmp 0x40b565
push str.Client_hook_re_allocation_failure._n
push 0x44f830
push 0
push 0
push 0
push 0
call fcn.00416580
add esp, 0x18
cmp eax, 1
jne 0x40b565
int3
xor eax, eax
jmp 0x40ba05
cmp dword [ebp - 4], 0xffffffbc
jbe 0x40b5d2
cmp dword [ebp + 0x14], 0
je 0x40b5a1
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 4]
push ecx
push str.Invalid_allocation_size:__Iu_bytes._n_nMemory_allocated_at__hs__d_._n
push 0
push 0
push 0
push 1
call fcn.00416580
add esp, 0x20
cmp eax, 1
jne 0x40b59f
int3
jmp 0x40b5c0
mov eax, dword [ebp - 4]
push eax
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 0x40b5c0
int3
call fcn.0040fc50
mov dword [eax], 0xc
xor eax, eax
jmp 0x40ba05
cmp dword [ebp + 0x10], 1
je 0x40b640
mov edx, dword [ebp + 0x10]
and edx, 0xffff
cmp edx, 4
je 0x40b640
mov eax, dword [ebp + 0x10]
and eax, 0xffff
cmp eax, 2
je 0x40b640
cmp dword [ebp + 0x14], 0
je 0x40b61e
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
push str.Error:_memory_allocation:_bad_memory_block_type._n_nMemory_allocated_at__hs__d_._n
push 0
push 0
push 0
push 1
call fcn.00416580
add esp, 0x1c
cmp eax, 1
jne 0x40b61c
int3
jmp 0x40b63e
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 0x40b63e
int3
jmp 0x40b691
push 4
movzx edx, byte [0x45ba39]
push edx
mov eax, dword [ebp + 8]
and eax, 0xfffffffc
sub eax, 4
push eax
call fcn.0040c4d0
add esp, 0xc
or eax, eax
je 0x40b691
mov ecx, dword [ebp + 8]
push ecx
push str.The_Block_at_0x_p_was_allocated_by_aligned_routines__use__aligned_realloc__
push 0
push 0
push 0
push 1
call fcn.00416580
add esp, 0x18
cmp eax, 1
jne 0x40b67f
int3
call fcn.0040fc50
mov dword [eax], 0x16
sub eax, eax
jmp 0x40ba05
mov eax, dword [ebp + 8]
push eax
call fcn.0040cbf0
add esp, 4
test eax, eax
jne 0x40b6c2
push str._CrtIsValidHeapPointer_pUserData_
push 0
push 0x319
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgheap.c
push 2
call fcn.0040ffe0
add esp, 0x14
cmp eax, 1
jne 0x40b6c2
int3
mov edx, dword [ebp + 8]
sub edx, 0x20
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x14], 3
jne 0x40b6db
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 0
je 0x40b719
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0xfedcbabc
jne 0x40b6f6
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x18], 0
je 0x40b717
push str.pOldBlock__nLine__IGNORE_LINE__pOldBlock__lRequest__IGNORE_REQ
push 0
push 0x323
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgheap.c
push 2
call fcn.0040ffe0
add esp, 0x14
cmp eax, 1
jne 0x40b717
int3
jmp 0x40b77d
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x14]
and edx, 0xffff
cmp edx, 2
jne 0x40b73e
mov eax, dword [ebp + 0x10]
and eax, 0xffff
cmp eax, 1
jne 0x40b73e
mov dword [ebp + 0x10], 2
mov ecx, dword [ebp - 0xc]
mov edx, dword [0x45d96c]
cmp edx, dword [ecx + 0x10]
jae 0x40b77d
mov eax, dword [ebp + 8]
push eax
push str.Error:_possible_heap_corruption_at_or_near_0x_p
push 0
push 0
push 0
push 1
call fcn.00416580
add esp, 0x18
cmp eax, 1
jne 0x40b76b
int3
call fcn.0040fc50
mov dword [eax], 0x16
xor eax, eax
jmp 0x40ba05
cmp dword [ebp + 0x1c], 0
je 0x40b7a8
mov edx, dword [ebp - 4]
add edx, 0x24
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.00416b80
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40b7a6
sub eax, eax
jmp 0x40ba05
jmp 0x40b7cb
mov ecx, dword [ebp - 4]
add ecx, 0x24
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.00416a20
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40b7cb
xor eax, eax
jmp 0x40ba05
xor eax, eax
jne 0x40b7cb
mov ecx, dword [0x45ba30]
add ecx, 1
mov dword [0x45ba30], ecx
cmp dword [ebp - 8], 0
jne 0x40b860
cmp dword [0x45d96c], 0xffffffff
jae 0x40b826
mov edx, dword [ebp - 0x10]
mov eax, dword [0x45d96c]
sub eax, dword [edx + 0x10]
mov dword [0x45d96c], eax
or ecx, 0xffffffff
sub ecx, dword [0x45d96c]
cmp ecx, dword [ebp - 4]
jbe 0x40b81c
mov edx, dword [0x45d96c]
add edx, dword [ebp - 4]
mov dword [0x45d96c], edx
jmp 0x40b826
mov dword [0x45d96c], 0xffffffff
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x45d984]
sub ecx, dword [eax + 0x10]
mov dword [0x45d984], ecx
mov edx, dword [0x45d984]
add edx, dword [ebp - 4]
mov dword [0x45d984], edx
mov eax, dword [0x45d984]
cmp eax, dword [0x45d978]
jbe 0x40b860
mov ecx, dword [0x45d984]
mov dword [0x45d978], ecx
mov edx, dword [ebp - 0x10]
add edx, 0x20
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
cmp ecx, dword [eax + 0x10]
jbe 0x40b898
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
sub eax, dword [edx + 0x10]
push eax
movzx ecx, byte [0x45ba3b]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
add eax, dword [edx + 0x10]
push eax
call fcn.00408840
add esp, 0xc
push 4
movzx ecx, byte [0x45ba38]
push ecx
mov edx, dword [ebp - 0x14]
add edx, dword [ebp - 4]
push edx
call fcn.00408840
add esp, 0xc
cmp dword [ebp - 8], 0
jne 0x40b8d2
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x18]
mov dword [edx + 0xc], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 0x18], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov dword [eax + 0x10], ecx
cmp dword [ebp + 0x1c], 0
jne 0x40b910
cmp dword [ebp + 0x1c], 0
jne 0x40b8ef
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp - 0xc]
je 0x40b910
push str.fRealloc____fRealloc__pNewBlock__pOldBlock_
push 0
push 0x38b
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgheap.c
push 2
call fcn.0040ffe0
add esp, 0x14
cmp eax, 1
jne 0x40b910
int3
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0xc]
je 0x40b91e
cmp dword [ebp - 8], 0
je 0x40b926
mov eax, dword [ebp - 0x14]
jmp 0x40ba05
mov edx, dword [ebp - 0x10]
cmp dword [edx], 0
je 0x40b93e
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
jmp 0x40b976
mov ecx, dword [0x45d970]
cmp ecx, dword [ebp - 0xc]
je 0x40b96a
push str._pLastBlock__pOldBlock
push 0
push 0x39c
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgheap.c
push 2
call fcn.0040ffe0
add esp, 0x14
cmp eax, 1
jne 0x40b96a
int3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
mov dword [0x45d970], ecx
mov edx, dword [ebp - 0x10]
cmp dword [edx + 4], 0
je 0x40b98e
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov dword [ecx], eax
jmp 0x40b9c5
mov ecx, dword [0x45d97c]
cmp ecx, dword [ebp - 0xc]
je 0x40b9ba
push str._pFirstBlock__pOldBlock
push 0
push 0x3a7
push str.f:dd_vctoolscrt_bld_self_x86crt_srcdbgheap.c
push 2
call fcn.0040ffe0
add esp, 0x14
cmp eax, 1
jne 0x40b9ba
int3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
mov dword [0x45d97c], ecx
cmp dword [0x45d97c], 0
je 0x40b9dc
mov edx, dword [0x45d97c]
mov eax, dword [ebp - 0x10]
mov dword [edx + 4], eax
jmp 0x40b9e5
mov ecx, dword [ebp - 0x10]
mov dword [0x45d970], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [0x45d97c]
mov dword [edx], eax
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 4], 0
mov edx, dword [ebp - 0x10]
mov dword [0x45d97c], edx
mov eax, dword [ebp - 0x14]
push ebp
pop esp
pop ebp
ret