Function at 0x406fc0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push edi
push esi
push ebx
sub esp, 0x94
mov esi, ecx
lea ebx, [esi + 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x28]
cmp eax, 0x1f4
jbe 0x407030
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov edx, dword [esi + 4]
inc edx
lea ecx, [esp + 0x14]
push edx
push dword [esi]
mov dword [esi + 4], edx
push str.Buff_Full_ID_02d_Count_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
add esp, 0x94
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret 4
mov edi, dword [esi + 0x24]
lea edx, [eax + edi]
test dl, 3
jne 0x407055
mov edx, dword [esi + 0x20]
mov dword [esp + 0x34], edx
lea ecx, [eax + 4]
shr ecx, 2
cmp edx, ecx
jbe 0x4070aa
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x30], edx
jmp 0x407063
mov edx, dword [esi + 0x20]
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], ecx
add edi, eax
mov eax, dword [esp + 0x34]
mov ecx, edi
shr ecx, 2
mov edx, ecx
sub edx, eax
cmp eax, ecx
mov eax, dword [esp + 0x30]
jbe 0x40707c
mov edx, ecx
mov eax, dword [eax + edx*4]
test eax, eax
je 0x4074d4
and edi, 3
lea edx, [eax + edi*4]
test edx, edx
je 0x407096
mov eax, dword [ebp + 8]
mov dword [edx], eax
inc dword [esi + 0x28]
mov dword [esi + 4], 0
mov esi, 1
jmp 0x407018
mov eax, edx
neg eax
add eax, 0xfffffff
cmp eax, 1
jb 0x4074c0
mov eax, dword [esp + 0x34]
shr eax, 1
cmp eax, 8
ja 0x4070cc
mov eax, 8
mov dword [esp + 0x24], eax
cmp eax, 1
ja 0x4074a0
mov dword [esp + 0x24], 1
mov edx, dword [esp + 0x34]
mov eax, edi
shr eax, 2
add edx, dword [esp + 0x24]
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], edx
jne 0x407102
mov dword [esp + 0x34], 0
jmp 0x40713d
mov ecx, edx
xor edx, edx
mov eax, 0xffffffff
div ecx
cmp eax, 4
jae 0x40713d
mov dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 4]
call fcn.0040cd64
mov dword [esp], vtable.std::bad_alloc.0
lea eax, [esp]
push 0x41f2d8
push eax
call fcn.0040ce75
mov eax, dword [esp + 0x34]
shl eax, 2
push eax
call fcn.0040c522
pop ecx
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x28]
lea ecx, [edx*4]
mov dword [esp + 0x20], ecx
lea ecx, [eax + edx*4]
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
lea edx, [eax + edx*4]
mov dword [esp + 0x2c], edx
sub eax, edx
mov edx, dword [esi + 0x20]
lea edx, [eax + edx*4]
sar edx, 2
lea eax, [edx*4]
mov dword [esp + 0x14], edx
lea ecx, [ecx + edx*4]
mov dword [esp + 0xc], ecx
test edx, edx
jbe 0x4071ad
push eax
push dword [esp + 0x30]
push eax
push dword [esp + 0x28]
call fcn.0040cec1
add esp, 0x10
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x24]
ja 0x40732f
mov eax, dword [esp + 0x20]
sar eax, 2
mov dword [esp + 0x20], eax
test eax, eax
jbe 0x4071e3
lea edx, [eax*4]
push edx
push dword [esp + 0x1c]
push edx
push dword [esp + 0x18]
call fcn.0040cec1
add esp, 0x10
mov edx, dword [esp + 0x24]
sub edx, dword [esp + 0x28]
je 0x4072a1
mov eax, dword [esp + 0x14]
and edi, 0xfffffffc
add edi, dword [esp + 0x30]
lea ecx, [edi + eax*4]
mov edi, dword [esp + 0x20]
mov dword [esp + 0xc], ecx
lea eax, [ecx + edi*4]
and eax, 0xf
je 0x40721f
test al, 3
jne 0x407468
neg eax
add eax, 0x10
shr eax, 2
lea ecx, [eax + 4]
cmp edx, ecx
jb 0x407468
mov ecx, edx
sub ecx, eax
and ecx, 3
neg ecx
add ecx, edx
test eax, eax
mov dword [esp + 0x14], ecx
jbe 0x40747c
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x18], 0
lea ecx, [ecx + edi*4]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
mov dword [ecx + edi*4], 0
inc edi
cmp edi, eax
jb 0x407258
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
pxor xmm0, xmm0
movdqa xmmword [ecx + eax*4], xmm0
add eax, 4
cmp eax, edi
jb 0x407270
mov dword [esp + 0x14], edi
cmp edx, dword [esp + 0x14]
jbe 0x4072a1
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0xc]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x14]
mov dword [eax + ecx*4], 0
inc ecx
cmp ecx, edx
jb 0x407295
mov eax, dword [esp + 0x28]
test eax, eax
jbe 0x40743a
mov eax, dword [esp + 0x30]
and eax, 0xf
je 0x4072c6
test al, 3
jne 0x407475
neg eax
add eax, 0x10
shr eax, 2
lea edx, [eax + 4]
cmp edx, dword [esp + 0x28]
ja 0x407475
mov ecx, dword [esp + 0x28]
mov edx, ecx
sub edx, eax
and edx, 3
neg edx
add edx, ecx
test eax, eax
jbe 0x4072f8
mov edi, dword [esp + 0x30]
xor ecx, ecx
mov dword [edi + ecx*4], 0
inc ecx
cmp ecx, eax
jb 0x4072ec
mov ecx, dword [esp + 0x30]
pxor xmm0, xmm0
movdqa xmmword [ecx + eax*4], xmm0
add eax, 4
cmp eax, edx
jb 0x407300
cmp edx, dword [esp + 0x28]
jae 0x40743a
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
mov dword [eax + edx*4], 0
inc edx
cmp edx, ecx
jb 0x40731e
jmp 0x40743a
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
lea ecx, [edx*4]
lea eax, [eax + edx*4]
sar ecx, 2
test ecx, ecx
jbe 0x40736b
shl ecx, 2
push ecx
push dword [esp + 0x1c]
push ecx
push dword [esp + 0x18]
call fcn.0040cec1
add esp, 0x10
mov edx, dword [esp + 0x24]
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x18], eax
lea eax, [eax + edx*4]
mov edx, dword [esp + 0x20]
sub edx, eax
add edx, dword [esp + 0x18]
sar edx, 2
mov dword [esp + 0x20], edx
test edx, edx
jbe 0x407396
lea ecx, [edx*4]
push ecx
push eax
push ecx
push dword [esp + 0x3c]
call fcn.0040cec1
add esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
jbe 0x40743a
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x30]
lea eax, [eax + edx*4]
and eax, 0xf
je 0x4073c2
test al, 3
jne 0x40748c
neg eax
add eax, 0x10
shr eax, 2
lea edx, [eax + 4]
cmp edx, dword [esp + 0x24]
ja 0x40748c
mov ecx, dword [esp + 0x24]
mov edx, ecx
sub edx, eax
and edx, 3
neg edx
add edx, ecx
test eax, eax
jbe 0x407490
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0xc], 0
lea ecx, [ecx + edi*4]
mov edi, dword [esp + 0xc]
mov dword [ecx + edi*4], 0
inc edi
cmp edi, eax
jb 0x4073fd
pxor xmm0, xmm0
movdqa xmmword [ecx + eax*4], xmm0
add eax, 4
cmp eax, edx
jb 0x40740d
cmp edx, dword [esp + 0x24]
jae 0x40743a
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x30]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x24]
mov dword [eax + edx*4], 0
inc edx
cmp edx, ecx
jb 0x40742e
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x407448
push eax
call fcn.0040c587
pop ecx
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
add edx, dword [esi + 0x20]
mov edi, dword [esi + 0x24]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x28]
mov dword [esp + 0x34], edx
mov dword [esi + 0x20], edx
jmp 0x407063
mov dword [esp + 0x14], 0
jmp 0x407280
xor edx, edx
jmp 0x40730c
mov ecx, dword [esp + 0xc]
lea ecx, [ecx + edi*4]
mov dword [esp + 0x1c], ecx
jmp 0x407264
xor edx, edx
jmp 0x407419
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
lea ecx, [ecx + edi*4]
jmp 0x407409
mov ecx, eax
mov eax, ecx
neg eax
add eax, 0xfffffff
mov edx, 1
cmp eax, dword [esp + 0x34]
cmovb ecx, edx
mov dword [esp + 0x24], ecx
jmp 0x4070e1
call fcn.00407500
mov edi, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov dword [esp + 0x34], eax
jmp 0x4070bc
push 0x10
mov dword [esp + 0x10], edx
call fcn.0040c522
mov edx, dword [esp + 0x10]
add esp, 4
mov ecx, dword [esi + 0x1c]
mov dword [ecx + edx*4], eax
mov eax, dword [esi + 0x1c]
mov eax, dword [eax + edx*4]
jmp 0x407087