Function at 0x409bd0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov esi, edi
lea ebx, [ebp - 0x1c]
call fcn.0041c3f0
mov eax, dword [edi + 8]
cmp eax, 0xffffffff
jne 0x409c04
mov edi, dword [ebp - 0x1c]
mov eax, dword [edi + 0x10]
and eax, 0x210
cmp eax, 0x10
jmp 0x40a122
cmp dword [edi], 1
jne 0x409d96
add eax, 0xfffffc18
mov dword [ebp - 0xc], eax
call fcn.0040aa20
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push 8
mov dword [ebp - 8], eax
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push 1
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov esi, dword [edi + 0x28]
sub esi, dword [edi + 0x20]
mov dword [ebp + 0x10], eax
xor eax, eax
mov ecx, dword [edi + 0x18]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov eax, esi
cdq
and edx, 7
lea ebx, [edx + eax]
mov edx, dword [edi + 0x20]
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x28], edx
mov edx, dword [edi + 0x24]
mov dword [ebp - 0x24], edx
mov edx, dword [edi + 0x28]
sar ebx, 3
mov dword [ebp - 0x20], edx
lea edx, [ebx + esi]
add eax, edx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xac]
mov eax, dword [ebp - 0x18]
mov dword [ebp + 0xc], 0
mov dword [ebp - 0x3c], ecx
cmp eax, dword [edx]
jne 0x409ce4
lea edx, [ebp - 0x124]
push edx
push 0x5c
push 6
push ecx
call dword [sym.imp.GDI32.dll_GetCurrentObject]
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
mov eax, 0x2bc
cmp dword [ebp - 0x114], eax
jg 0x409cc0
mov dword [ebp - 0x114], eax
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
mov ecx, dword [ebp - 0x3c]
push eax
push ecx
mov dword [ebp + 0xc], eax
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [ebp - 0x30], 0
jne 0x409ce4
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x54]
push 0x824
lea edx, [ebp - 0x2c]
push edx
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + edx*4]
mov ecx, dword [edi + 0x18]
push 0xffffffffffffffff
push eax
push ecx
call dword [sym.imp.USER32.dll_DrawTextW]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x3c]
push edx
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [ebp - 0x38], 0
jne 0x409d1d
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x3c]
push ecx
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [ebp - 0x34], 0
jne 0x409d34
mov dword [ebp - 0x34], eax
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x28]
sub ecx, ebx
push ecx
mov ecx, dword [edi + 0x20]
mov edx, eax
sub edx, ebx
add edx, esi
push edx
mov edx, dword [edi + 0x18]
add ecx, ebx
push ecx
add eax, ebx
push eax
push edx
call dword [sym.imp.GDI32.dll_Rectangle]
xor esi, esi
lea esp, [esp]
mov eax, dword [ebp + esi*4 - 0x38]
test eax, eax
je 0x409d73
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
inc esi
cmp esi, 3
jl 0x409d60
mov ecx, dword [ebp + 0xc]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
push ecx
call esi
mov edx, dword [ebp + 0x10]
push edx
call esi
mov eax, dword [ebp - 8]
push eax
call esi
jmp case.0x409daf.1023
mov esi, dword [ebp + 0xc]
lea ecx, [esi - 0x3fe]
cmp ecx, 0x21
ja case.0x409daf.1023
movzx edx, byte [ecx + 0x40a15c]
jmp dword [edx*4 + 0x40a150]
mov edx, dword [edi + 0x14]
lea ecx, [ebp - 0xc4]
push ecx
push eax
push 0x148
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [edi + 0x24]
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x20]
push 0x824
mov dword [ebp - 0x24], edx
add eax, 3
lea edx, [ebp - 0x2c]
push edx
mov dword [ebp - 0x28], ecx
mov ecx, dword [edi + 0x28]
mov dword [ebp - 0x2c], eax
push 0xffffffffffffffff
lea eax, [ebp - 0xc4]
mov dword [ebp - 0x20], ecx
mov ecx, dword [edi + 0x18]
push eax
push ecx
call dword [sym.imp.USER32.dll_DrawTextW]
cmp esi, 0x41f
jne 0x409e1e
mov edx, dword [edi + 8]
mov eax, dword [ebp + 8]
lea esi, [eax + edx*8 + 0xe4]
jmp case.default.0x409e2d
mov eax, dword [edi + 8]
lea esi, [ebp - 0x14]
cmp eax, 3
ja case.default.0x409e2d
jmp dword [eax*4 + 0x40a180]
mov dword [ebp - 0x14], InitCommonControls
mov dword [ebp - 0x10], InitCommonControls
jmp case.default.0x409e2d
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0xb0]
mov eax, dword [ecx]
call fcn.0040bbb0
mov edx, dword [ebx + 0xb0]
not eax
and eax, 0xffffff
mov dword [ebp - 0x14], eax
mov eax, dword [edx + 4]
call fcn.0040bbb0
not eax
and eax, 0xffffff
mov dword [ebp - 0x10], eax
jmp case.default.0x409e2d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xb0]
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edx
jmp case.default.0x409e2d
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xb0]
mov eax, dword [ecx]
call fcn.0040bbb0
push 0xd
mov ebx, eax
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
call fcn.0041e040
mov edx, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [edx + 0xb0]
mov ecx, dword [eax + 4]
add esp, 4
mov dword [ebp - 0x10], ecx
mov edx, dword [edi + 0x18]
mov ebx, dword [ebp - 0x20]
sub ebx, dword [ebp - 0x28]
push 2
push edx
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [esi]
test eax, eax
jns 0x409ee9
and eax, 0xff
push eax
call dword [sym.imp.USER32.dll_GetSysColor]
jmp 0x409eee
and eax, 0xffffff
push eax
mov eax, dword [edi + 0x18]
push eax
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [esi + 4]
test eax, eax
jns 0x409f0e
and eax, 0xff
push eax
call dword [sym.imp.USER32.dll_GetSysColor]
jmp 0x409f13
and eax, 0xffffff
mov ecx, dword [edi + 0x18]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword [ebp - 0x24]
mov ecx, dword [edi + 0x18]
sub eax, 4
mov dword [ebp - 0x24], eax
lea edx, [ebx*4]
sub eax, edx
push 0x826
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
push 0xffffffffffffffff
push str.__ABCxyz
push ecx
call dword [sym.imp.USER32.dll_DrawTextW]
jmp case.0x409daf.1023
mov ebx, dword [ebp + 8]
lea edx, [ebp - 0xc4]
push edx
push eax
mov eax, dword [ebx + 0xc]
push 0x148
push esi
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
cmp word [ebp - 0xc4], 0x20
jne 0x409f91
cmp word [ebp - 0xc2], 0
jne 0x409f91
mov dword [ebp - 8], 1
jmp 0x409fc8
mov ecx, dword [ebx + 0xb8]
mov dword [ebp - 8], 0
cmp ecx, 0xffffffff
jne 0x409fc8
lea esi, [ebp - 0x18]
call fcn.00406640
push ebx
mov dword [ebx + 0xb8], 1
call fcn.0040a3a0
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.USER32.dll_SetCursor]
mov esi, dword [ebp + 0xc]
mov eax, dword [edi + 0x28]
sub eax, dword [edi + 0x20]
sub eax, dword [ebx + 0x68]
cdq
sub eax, edx
sar eax, 1
add eax, dword [edi + 0x20]
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 0xb8]
cmp eax, 2
je 0x40a0b6
lea ecx, [ebp + 8]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::constructor_void_]
mov ecx, dword [edi + 0x18]
push ecx
lea ecx, [ebx + 0x30]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::SetDestDC_struct_HDC____]
mov edx, dword [edi + 0x18]
push edx
lea ecx, [ebx + 0x30]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::SetColors_struct_HDC____]
cmp dword [ebp - 8], 0
je 0x40a048
xor eax, eax
cmp dword [ebp + 0xc], 0x403
lea edi, [ebp - 0x40]
setne al
add eax, 0x93
push eax
call fcn.0041d6c0
add esp, 4
push eax
lea ecx, [ebp + 8]
call dword [0x4253b8]
mov ecx, edi
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
mov edi, dword [ebp + 0x10]
jmp 0x40a085
lea ecx, [ebp - 0xc4]
push ecx
lea ecx, [ebp + 8]
call dword [sym.imp.Ngs3.dll_public:_class_C2bString_const____thiscall_C2bString::operator_wchar_t_const__]
mov edx, dword [ebx + 0xb8]
test edx, edx
jne 0x40a085
lea eax, [ebp - 0x44]
push eax
push edx
push ebx
push 0x406730
push edx
push edx
mov dword [ebx + 0xb8], 1
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0xb4], eax
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x24]
mov edx, dword [ebp + 8]
push 0
push 0
sub ecx, eax
add ecx, 8
push ecx
mov ecx, dword [ebp - 0xc]
push 0
push 0xffffffffffffffff
push edx
push ecx
push eax
lea ecx, [ebx + 0x30]
call dword [sym.imp.Ngs3.dll_public:_int___thiscall_CHanLib::UPuts_int__int__wchar_t_const___int__int__int__struct_CHanLib::COLOR_INFO_const___int_]
lea ecx, [ebp + 8]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
jmp case.0x409daf.1023
cmp esi, 0x3fe
jne 0x40a0c7
mov dword [ebp + 8], 0
jmp 0x40a0d6
xor edx, edx
cmp esi, 0x402
setne dl
inc edx
mov dword [ebp + 8], edx
mov edx, dword [edi + 0x10]
mov eax, dword [ebx + 0x68]
mov esi, dword [edi + 8]
mov ecx, dword [edi + 0x1c]
and edx, 1
lea edx, [edx + esi*2]
imul edx, eax
push 0xcc0020
push edx
mov edx, dword [ebp + 8]
mov edx, dword [ebx + edx*4 + 0x58]
mov edx, dword [edx]
push 0
push edx
mov edx, dword [ebp - 0xc]
push eax
mov eax, dword [edi + 0x24]
sub eax, ecx
push eax
mov eax, dword [edi + 0x18]
push edx
push ecx
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov edi, dword [ebp - 0x1c]
mov ecx, dword [edi + 0x10]
and ecx, 0x210
cmp ecx, 0x10
jne 0x40a147
mov esi, dword [edi + 0x18]
push 0
push esi
call dword [sym.imp.GDI32.dll_SetTextColor]
push 0xffffff
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
add edi, 0x1c
push edi
push esi
call dword [sym.imp.USER32.dll_DrawFocusRect]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc