Function at 0x406740
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b1a43
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
mov eax, dword [0x639210]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xd8], eax
mov eax, dword [ebp + 0x14]
mov esi, dword [edi + 8]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xdc], edi
mov dword [ebp - 0xe0], eax
test esi, esi
js 0x406bae
cmp esi, 0xa
jge 0x406bae
mov ecx, dword [0x6499e8]
mov eax, esi
shr eax, 5
lea edx, [ecx + eax*4]
mov ecx, esi
and ecx, 0x1f
mov eax, 1
shl eax, cl
test dword [edx], eax
je 0x406bae
lea eax, [esi - 1]
cmp eax, 8
ja 0x4067dd
mov eax, dword [0x6499dc]
lea ecx, [esi + esi*2]
lea ebx, [eax + ecx*8]
jmp 0x4067e3
mov ebx, dword [0x6499dc]
cmp dword [ebx + 0x14], 0x10
mov dword [ebp - 0xc4], ebx
jb 0x4067f7
mov ebx, dword [ebx]
mov dword [ebp - 0xc4], ebx
push dword [edi]
lea ecx, [ebp - 0x44]
call fcn.0041db10
lea eax, [ebp - 0x44]
mov dword [ebp - 4], 0
push eax
call fcn.00407430
lea eax, [ebp - 0x2c]
push eax
call fcn.004075d0
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x5c], 0
mov esi, dword [ebp - 0xc0]
push 0x603fa0
push esi
mov byte [ebp - 4], 2
call fcn.00569080
add esp, 8
test eax, eax
je 0x40686b
push esi
lea ecx, [ebp - 0x5c]
call fcn.004119b0
push ecx
lea ecx, [ebp - 0x5c]
call fcn.004030d0
cmp dword [ebp - 0x48], 0x10
lea esi, [ebp - 0x5c]
cmovae esi, dword [ebp - 0x5c]
mov dword [ebp - 0xc0], esi
lea ecx, [ebp - 0xbc]
call fcn.00402190
lea eax, [ebp - 0xbc]
mov byte [ebp - 4], 3
push eax
call fcn.00410e50
push ecx
lea ecx, [ebp - 0xbc]
call fcn.004026b0
mov dword [ebp - 0xc8], eax
mov edi, 0x400
xor ebx, ebx
nop
push edi
call fcn.00569bc0
mov esi, eax
add esp, 4
test esi, esi
je 0x4069e0
cmp dword [ebp - 0x18], 0x10
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
mov dword [ebp - 0xd0], 0
cmovae edx, dword [ebp - 0x2c]
mov eax, 0x649acc
cmp dword [ebp - 0x30], 0x10
push edx
push dword [ebp - 0xc4]
cmovae ecx, dword [ebp - 0x44]
cmp dword [0x649ae0], 0x10
push ecx
cmovae eax, dword [0x649acc]
push eax
push dword [ebp - 0xc8]
push str.__s____s___s:Level__s:_s
push edi
push esi
call fcn.00404d80
add esp, 0x20
cmp edi, 0x7fffffff
ja 0x406928
lea eax, [ebp - 0xd0]
mov edx, edi
push eax
mov ecx, esi
call fcn.00404df0
test eax, eax
js 0x406928
mov ecx, dword [ebp - 0xd0]
jmp 0x40692a
xor ecx, ecx
push dword [ebp - 0xe0]
mov eax, edi
push dword [ebp - 0xc0]
sub eax, ecx
push eax
lea eax, [ecx + esi]
push eax
lea eax, [ebp - 0xd4]
push eax
call fcn.004109d0
test eax, eax
jns 0x4069eb
cmp eax, 0xfffffffe
je 0x406975
push esi
call fcn.00569c52
inc ebx
add esp, 4
xor esi, esi
add edi, 0x400
cmp ebx, 0xa
jl 0x4068a0
jmp 0x4069eb
mov eax, dword [0x6499dc]
add eax, 0x78
mov dword [ebp - 0xc0], eax
cmp dword [eax + 0x14], 0x10
jb 0x406991
mov eax, dword [eax]
mov dword [ebp - 0xc0], eax
push dword [ebp - 0xd4]
cmp dword [ebp - 0x18], 0x10
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
mov eax, 0x649acc
cmovae edx, dword [ebp - 0x2c]
cmp dword [ebp - 0x30], 0x10
push edx
push dword [ebp - 0xc0]
cmovae ecx, dword [ebp - 0x44]
cmp dword [0x649ae0], 0x10
push ecx
cmovae eax, dword [0x649acc]
push eax
push dword [ebp - 0xc8]
push str.__s____s___s:Level__s:_s_tExceptionCode0x_X._n
push edi
push esi
call fcn.00404d80
add esp, 0x24
jmp 0x4069eb
push str.DebugLog2:_ERROR_malloc_error______n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp ebx, 0xa
jne 0x406a5f
mov edi, 0x400
push edi
call fcn.00569bc0
mov esi, eax
add esp, 4
test esi, esi
je 0x406b33
mov edx, dword [0x6499dc]
add edx, 0x78
cmp dword [edx + 0x14], 0x10
jb 0x406a19
mov edx, dword [edx]
cmp dword [ebp - 0x18], 0x10
lea ecx, [ebp - 0x2c]
lea eax, [ebp - 0x44]
mov ebx, 0x649acc
cmovae ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x30], 0x10
push ecx
cmovae eax, dword [ebp - 0x44]
cmp dword [0x649ae0], 0x10
push edx
cmovae ebx, dword [0x649acc]
push eax
push ebx
push dword [ebp - 0xc8]
push str.__s____s___s:Level__s:_s_tMemory_over_10K._n
push 0x400
push esi
call fcn.00404d80
add esp, 0x20
test esi, esi
je 0x406b33
mov ebx, dword [ebp + 0x10]
test bl, 1
je 0x406a76
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test bl, 2
je 0x406b2a
mov dword [ebp - 0xcc], 0
cmp edi, 0x7fffffff
ja 0x406aad
lea eax, [ebp - 0xcc]
mov edx, edi
push eax
mov ecx, esi
call fcn.00404df0
test eax, eax
js 0x406aad
mov eax, dword [ebp - 0xcc]
jmp 0x406aaf
xor eax, eax
cmp byte [eax + esi - 1], 0xa
lea ecx, [eax + esi]
lea edx, [eax + 1]
je 0x406ad4
cmp edx, edi
ja 0x406ac5
mov byte [ecx], 0xa
mov eax, edx
lea ecx, [eax + 1]
cmp ecx, edi
ja 0x406add
mov byte [eax + esi], 0xa
mov eax, ecx
jmp 0x406add
cmp edx, edi
ja 0x406add
mov byte [ecx], 0xa
mov eax, edx
mov edx, dword [ebp - 0xdc]
cmp dword [edx + 4], 2
jne 0x406b02
mov ecx, dword [edx + 8]
cmp ecx, 1
je 0x406afa
cmp ecx, 2
je 0x406afa
xor ecx, ecx
jmp 0x406aff
mov ecx, 1
mov dword [edx + 4], ecx
mov ecx, dword [edx + 4]
test ecx, ecx
jne 0x406ba0
push eax
push esi
push dword [ebp - 0xd8]
push ecx
call fcn.00407680
test al, al
jne 0x406b2a
push str.CDebugLog::PushLog1
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push esi
call fcn.00569c52
add esp, 4
xor ebx, ebx
lea ecx, [ebp - 0xbc]
test esi, esi
sete bl
call fcn.00402220
cmp dword [ebp - 0x48], 0x10
jb 0x406b56
push dword [ebp - 0x5c]
call fcn.0043f3a3
add esp, 4
cmp dword [ebp - 0x18], 0x10
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x5c], 0
jb 0x406b79
push dword [ebp - 0x2c]
call fcn.0043f3a3
add esp, 4
cmp dword [ebp - 0x30], 0x10
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
jb 0x406b9c
push dword [ebp - 0x44]
call fcn.0043f3a3
add esp, 4
mov eax, ebx
jmp 0x406bb0
cmp ecx, 1
jne 0x406b33
push eax
push esi
call fcn.004073f0
jmp 0x406b33
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00567455
mov esp, ebp
pop ebp
ret 0x14