Function at 0x409b68
Capabilities:
Create thread

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x7c
mov ebp, dword [esp + 0x90]
mov esi, dword [esp + 0x94]
mov dl, byte [esp + 0xa4]
mov byte [esp + 0x28], dl
mov dl, byte [esp + 0xa8]
mov byte [esp + 0x2f], dl
cmp byte [0x4f20f8], 0
jne 0x409c43
mov byte [0x4f20f8], 1
mov dword [0x4f20e0], 0
mov dword [esp + 0x40], 0x30
mov dword [esp + 0x44], 0x808
mov dword [esp + 0x48], sym.__Z7WndProcP6HWND__jjl_16
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 4], 0x7f00
mov dword [esp], 0
call sym._LoadCursorA_8
sub esp, 8
mov dword [esp + 0x5c], eax
mov dword [esp], 4
call sym._GetStockObject_4
push edx
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], str.BGILibrary
lea eax, [esp + 0x40]
mov dword [esp], eax
call sym._RegisterClassExA_4
push ecx
test ax, ax
je 0x409f1b
mov dword [esp], 0x308
call sym.operator_new_unsigned_int_
mov ebx, eax
mov ecx, eax
call method.WindowData.WindowData__
test ebx, ebx
je 0x40a0c4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._CreateEventA_16
sub esp, 0x10
mov dword [ebx + 0xd0], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._CreateEventA_16
sub esp, 0x10
mov dword [ebx + 0xd4], eax
mov dword [ebx], ebp
mov dword [ebx + 4], esi
mov eax, dword [esp + 0x9c]
mov dword [ebx + 8], eax
mov eax, dword [esp + 0xa0]
mov dword [ebx + 0xc], eax
xor eax, eax
mov ecx, 0xffffffff
mov edi, dword [esp + 0x98]
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx - 1]
lea ecx, [ebx + 0x10]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x98]
mov dword [esp], eax
call method.std::string.assign_char_const__unsigned_int_
sub esp, 8
lea eax, [ebx + 0xd8]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], sym.__Z21BGI__ThreadInitWindowPv_4
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._CreateThread_24
sub esp, 0x18
test eax, eax
je 0x409f9c
mov dword [esp + 0x38], eax
mov eax, dword [ebx + 0xd4]
mov dword [esp + 0x3c], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
lea eax, [esp + 0x38]
mov dword [esp + 4], eax
mov dword [esp], 2
call sym._WaitForMultipleObjects_16
sub esp, 0x10
test eax, eax
jne 0x409e28
lea eax, [ebx + 0x110]
lea edi, [ebx + 0x2a0]
mov dword [esp + 0x28], ebx
mov ebp, eax
lea esi, [esi]
mov edx, dword [edi]
test edx, edx
je 0x409dbf
mov esi, dword [edi + 0x24]
add esi, 4
mov ebx, dword [edi + 0x14]
cmp esi, ebx
jbe 0x409db7
nop
mov edx, dword [ebx]
mov dword [esp], edx
call sym.operator_delete_void_
add ebx, 4
cmp esi, ebx
ja 0x409da4
mov edx, dword [edi]
mov dword [esp], edx
call sym.operator_delete_void_
sub edi, 0x28
lea eax, [edi + 0x28]
cmp ebp, eax
jne 0x409d90
mov ebx, dword [esp + 0x28]
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x409e00
mov edi, dword [ebx + 0x38]
add edi, 4
mov esi, dword [ebx + 0x28]
cmp edi, esi
jbe 0x409df8
lea esi, [esi]
mov eax, dword [esi]
mov dword [esp], eax
call sym.operator_delete_void_
add esi, 4
cmp edi, esi
ja 0x409de4
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sym.operator_delete_void_
mov edx, dword [ebx + 0x10]
lea esi, [edx - 0xc]
cmp esi, 0x4dd4b8
jne 0x40a0ce
mov dword [esp], ebx
call sym.operator_delete_void_
mov eax, 0xffffffff
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x4f20e4]
lea edx, [eax + 1]
mov dword [0x4f20e4], edx
mov edx, dword [0x4f20ec]
cmp edx, dword [0x4f20f0]
je 0x40a09d
test edx, edx
je 0x40a096
mov ecx, dword [ebx + 0x98]
mov dword [edx], ecx
mov edx, dword [0x4f20ec]
add edx, 4
mov dword [0x4f20ec], edx
mov dword [0x4dd1e0], eax
mov dl, byte [esp + 0x28]
mov byte [ebx + 0xc4], dl
mov dl, byte [esp + 0x2f]
mov byte [ebx + 0xc5], dl
mov dword [ebx + 0xf4], 0
mov dword [esp + 0x24], eax
call sym._graphdefaults
mov dword [esp], 0
call sym._setcolor
dec esi
lea ebx, [ebp - 1]
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._line
mov dword [esp + 4], 0
mov dword [esp], 1
call sym._setfillstyle
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._bar
mov dword [esp], 0xf
call sym._setcolor
mov dword [esp + 4], 0xf
mov dword [esp], 1
call sym._setfillstyle
mov eax, dword [esp + 0x24]
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
call sym._GetLastError_0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
lea edx, [esp + 0x34]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x1300
call sym._FormatMessageA_28
sub esp, 0x1c
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sym._LocalFree_4
push eax
mov eax, 0xffffffff
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
call sym._GetLastError_0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
lea edx, [esp + 0x34]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x1300
call sym._FormatMessageA_28
sub esp, 0x1c
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._MessageBoxA_16
sub esp, 0x10
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sym._LocalFree_4
push ebp
lea eax, [ebx + 0x110]
lea edi, [ebx + 0x2a0]
mov dword [esp + 0x28], ebx
mov ebp, eax
nop
mov edx, dword [edi]
test edx, edx
je 0x40a053
mov esi, dword [edi + 0x24]
add esi, 4
mov ebx, dword [edi + 0x14]
cmp esi, ebx
jbe 0x40a04b
nop
mov edx, dword [ebx]
mov dword [esp], edx
call sym.operator_delete_void_
add ebx, 4
cmp esi, ebx
ja 0x40a038
mov edx, dword [edi]
mov dword [esp], edx
call sym.operator_delete_void_
sub edi, 0x28
lea eax, [edi + 0x28]
cmp ebp, eax
jne 0x40a024
mov ebx, dword [esp + 0x28]
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x409e00
mov edi, dword [ebx + 0x38]
add edi, 4
mov esi, dword [ebx + 0x28]
cmp edi, esi
jbe 0x409df8
lea esi, [esi]
mov eax, dword [esi]
mov dword [esp], eax
call sym.operator_delete_void_
add esi, 4
cmp edi, esi
ja 0x40a080
jmp 0x409df5
xor edx, edx
jmp 0x409e5e
lea ecx, [ebx + 0x98]
mov dword [esp + 4], ecx
mov dword [esp], edx
mov ecx, 0x4f20e8
mov dword [esp + 0x24], eax
call method.std::vector_HWND____std::allocator_HWND_____._M_insert_aux___gnu_cxx::__normal_iterator_HWND____std::vector_HWND____std::allocator_HWND_________HWND___const_
sub esp, 8
mov eax, dword [esp + 0x24]
jmp 0x409e67
mov eax, 0xffffffff
jmp 0x409e1f
lea eax, [edx - 4]
mov edi, dword [0x4f3874]
test edi, edi
jne 0x40a100
mov eax, dword [edx - 4]
lea ecx, [eax - 1]
mov dword [edx - 4], ecx
test eax, eax
jg 0x409e12
lea eax, [esp + 0x33]
mov dword [esp], eax
mov ecx, esi
call method.std::string::_Rep._M_destroy_std::allocator_char__const_
push ecx
jmp 0x409e12
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call method.__gnu_cxx.__exchange_and_add_int_volatile__int_
jmp 0x40a0e4