Function at 0x40a890
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0xc114
call fcn.00429400
mov eax, dword [0x4ae7ec]
xor eax, esp
mov dword [esp + 0xc110], eax
mov eax, dword [ebp + 8]
push esi
mov dword [esp + 0xc], eax
mov esi, ecx
cmp ebx, 0x100
jge 0x40a8d1
test eax, eax
je 0x40adb6
cmp byte [eax], 0
je 0x40adb6
lea edx, [esp + 0x10]
xor eax, eax
xor ecx, ecx
push edx
mov word [esp + 0x40ec], ax
mov word [esp + 0x20e4], cx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x1c]
movzx ecx, word [esp + 0x1a]
movzx edx, word [esp + 0x18]
push eax
movzx eax, word [esp + 0x1a]
push ecx
movzx ecx, word [esp + 0x1a]
push edx
movzx edx, word [esp + 0x1c]
push eax
push ecx
push edx
push str._.2ld__.2ld__.2ld__.2ld:_.2ld:_.2ld
lea eax, [esp + 0x54]
push 0x50
push eax
call sym.SelectBehaviorsExe.exe_TM_FormatStringW
add esp, 0x24
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str._05d:_05d
lea ecx, [esp + 0x2c]
push 0x18
push ecx
call fcn.004173ea
add esp, 0x14
test bl, 1
je 0x40a96e
lea edx, [esp + 0x38]
push edx
push str.__s_
lea eax, [esp + 0x40f0]
push 0x1000
push eax
call fcn.00405080
add esp, 0x10
test ebx, 0x100
je 0x40a995
lea ecx, [esp + 0x38]
push ecx
push str.__s_
lea edx, [esp + 0x20e8]
push 0x1000
push edx
call fcn.00405080
add esp, 0x10
cmp word [esp + 0x20], 0
je 0x40a9e8
test bl, 2
je 0x40a9c1
lea eax, [esp + 0x20]
push eax
push str.__s_
lea ecx, [esp + 0x40f0]
push 0x1000
push ecx
call fcn.00405080
add esp, 0x10
test ebx, 0x200
je 0x40a9e8
lea edx, [esp + 0x20]
push edx
push str.__s_
lea eax, [esp + 0x20e8]
push 0x1000
push eax
call fcn.00405080
add esp, 0x10
test bl, 4
je 0x40ab46
cmp word [esp + 0x40e8], 0
je 0x40aa52
push 0x1000
lea ecx, [esp + 0x40ec]
push 0x435288
push ecx
call sym.SelectBehaviorsExe.exe_TM_AppendStringW
lea eax, [esp + 0x40f4]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40aa20
sub eax, edx
xor ecx, ecx
sar eax, 1
je 0x40aa52
jmp 0x40aa40
mov edx, 0x20
mov word [esp + ecx*2 + 0xa108], dx
inc ecx
cmp ecx, eax
jb 0x40aa40
lea eax, [esp + 0x40e8]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40aa60
push edi
sub eax, edx
push esi
lea edx, [esp + 0x7100]
sar eax, 1
xor ecx, ecx
push 0xfff
push edx
mov word [esp + eax*2 + 0xa118], cx
call fcn.004193ad
xor eax, eax
push 0x1000
lea edx, [esp + 0xec]
mov word [esp + 0x910a], ax
push edx
lea eax, [esp + 0x20]
lea ecx, [esp + 0x7110]
push eax
mov dword [esp + 0x24], ecx
call sym.SelectBehaviorsExe.exe_TM_GetLineW
lea ecx, [esp + 0xf4]
push ecx
push 0x43528c
lea edx, [esp + 0x410c]
push 0x1000
push edx
call fcn.00405080
push 0x1000
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x3c]
push ecx
call sym.SelectBehaviorsExe.exe_TM_GetLineW
add esp, 0x38
cmp eax, 0x20
je 0x40ab46
jmp 0x40ab00
lea edx, [esp + 0xd8]
push edx
lea eax, [esp + 0xa10c]
push eax
push 0x435294
lea ecx, [esp + 0x40f4]
push 0x1000
push ecx
call fcn.00405080
push 0x1000
lea edx, [esp + 0xf0]
push edx
lea eax, [esp + 0x24]
push eax
call sym.SelectBehaviorsExe.exe_TM_GetLineW
add esp, 0x20
cmp eax, 0x20
jne 0x40ab00
test ebx, 0x400
je 0x40ace0
cmp word [esp + 0x20e0], 0
je 0x40abb2
push 0x1000
lea ecx, [esp + 0x20e4]
push 0x435288
push ecx
call sym.SelectBehaviorsExe.exe_TM_AppendStringW
lea eax, [esp + 0x20ec]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40ab81
sub eax, edx
xor ecx, ecx
sar eax, 1
je 0x40abb2
jmp 0x40aba0
mov edx, 0x20
mov word [esp + ecx*2 + 0xa108], dx
inc ecx
cmp ecx, eax
jb 0x40aba0
lea eax, [esp + 0x20e0]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40abc0
push edi
sub eax, edx
push esi
lea edx, [esp + 0x7100]
sar eax, 1
xor ecx, ecx
push 0xfff
push edx
mov word [esp + eax*2 + 0xa118], cx
call fcn.004193ad
xor eax, eax
push 0x1000
lea edx, [esp + 0xec]
mov word [esp + 0x910a], ax
push edx
lea eax, [esp + 0x20]
lea ecx, [esp + 0x7110]
push eax
mov dword [esp + 0x24], ecx
call sym.SelectBehaviorsExe.exe_TM_GetLineW
lea ecx, [esp + 0xf4]
push ecx
push 0x43528c
lea edx, [esp + 0x2104]
push 0x1000
push edx
call fcn.00405080
push 0x1000
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x3c]
push ecx
call sym.SelectBehaviorsExe.exe_TM_GetLineW
add esp, 0x38
cmp eax, 0x20
je 0x40ace0
jmp 0x40ac60
lea eax, [esp + 0x20e0]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40ac70
sub eax, edx
sar eax, 1
lea edx, [eax + 1]
cmp edx, 0x1001
jae 0x40acc1
lea ecx, [esp + 0xd8]
push ecx
lea edx, [esp + 0xa10c]
push edx
mov ecx, 0x1001
push 0x435294
sub ecx, eax
push ecx
lea edx, [esp + eax*2 + 0x20f0]
push edx
call fcn.00401cb0
add esp, 0x14
xor eax, eax
mov word [esp + 0x40e0], ax
push 0x1000
lea ecx, [esp + 0xdc]
push ecx
lea edx, [esp + 0x10]
push edx
call sym.SelectBehaviorsExe.exe_TM_GetLineW
add esp, 0xc
cmp eax, 0x20
jne 0x40ac60
cmp word [esp + 0x40e8], 0
je 0x40ad42
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40ad42
cmp byte [eax], 0
je 0x40ad42
push 0x435240
push eax
call fcn.00418e48
mov esi, eax
add esp, 8
test esi, esi
je 0x40ad42
push 0x1001
lea eax, [esp + 0x40ec]
push eax
lea ecx, [esp + 0x9108]
push ecx
call sym.SelectBehaviorsExe.exe_TM_WCToMB
lea edx, [esp + 0x910c]
push edx
push 0x435264
push esi
call fcn.004190e0
push esi
call fcn.0041ad3c
add esp, 0x1c
cmp word [esp + 0x20e0], 0
je 0x40adb6
call sym.SelectBehaviorsExe.exe_TM_IsWinNT
test eax, eax
lea eax, [esp + 0x60f0]
je 0x40ad7d
push 0
push 0
push 0x1001
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x20f4]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x40ad93
push 0x1001
lea edx, [esp + 0x20e4]
push edx
push eax
call fcn.00419d4b
add esp, 0xc
lea ecx, [esp + 0x60f0]
push ecx
push 0x435264
call sym.SelectBehaviorsExe.exe_TM_Print
add esp, 8
lea edx, [esp + 0x20e0]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [esp + 0xc114]
pop esi
xor ecx, esp
call fcn.004171f3
mov esp, ebp
pop ebp
ret