Function at 0x406630
Capabilities:
Check mutex on windows
Hide graphical window

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebx, dword [esp + 0x80]
mov eax, dword [ebx + 0x10]
mov edi, dword [eax - 0xc]
test edi, edi
jne 0x406a9c
xor edi, edi
mov dword [esp], 7
call sym._GetSystemMetrics_4
push edx
mov esi, eax
mov dword [esp], 8
call sym._GetSystemMetrics_4
push ecx
mov edx, dword [ebx + 4]
add edx, edi
lea edi, [edx + eax*2]
mov eax, dword [ebx]
lea esi, [eax + esi*2]
mov ebp, dword [ebx + 8]
mov edx, dword [ebx + 0x10]
cmp dword [edx - 0xc], 1
sbb eax, eax
and eax, 0x7f760000
add eax, 0xca0000
mov dword [esp + 0x2c], 0
mov ecx, dword [0x4f20e0]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], esi
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 0x4de164
mov dword [esp], 0
call sym._CreateWindowExA_48
sub esp, 0x30
mov ebp, eax
test eax, eax
je 0x406ab0
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._GetSystemMenu_8
sub esp, 8
mov esi, eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x800
mov dword [esp], eax
call sym._AppendMenuA_16
sub esp, 0x10
mov dword [esp + 0xc], str.Save_image_as...
mov dword [esp + 8], 4
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._AppendMenuA_16
sub esp, 0x10
mov dword [esp + 0xc], str.Print_2__wide...
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._AppendMenuA_16
sub esp, 0x10
mov dword [esp + 0xc], str.Print_4.5__wide...
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._AppendMenuA_16
sub esp, 0x10
mov dword [esp + 0xc], str.Print_7__wide...
mov dword [esp + 8], 3
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._AppendMenuA_16
sub esp, 0x10
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x800
mov dword [esp], esi
call sym._AppendMenuA_16
sub esp, 0x10
mov dword [ebx + 0x98], ebp
mov dword [esp + 8], ebx
mov dword [esp + 4], 0xffffffeb
mov dword [esp], ebp
call sym._SetWindowLongA_12
sub esp, 0xc
mov dword [ebx + 0xc0], 0
mov dword [ebx + 0xbc], 0
lea edx, [ebx + 0x2d4]
xor eax, eax
mov ecx, 0x2c
mov edi, edx
rep stosb byte es:[edi], al
lea edx, [ebx + 0x2c8]
mov cl, 0xb
mov edi, edx
rep stosb byte es:[edi], al
mov dword [esp], ebp
call sym._GetDC_4
push edx
mov esi, eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._CreateMutexA_12
sub esp, 0xc
mov dword [ebx + 0x304], eax
mov dword [esp + 4], 0x1388
mov dword [esp], eax
call sym._WaitForSingleObject_8
sub esp, 8
mov dword [esp], esi
call sym._CreateCompatibleDC_4
push ecx
mov dword [ebx + 0x9c], eax
mov eax, dword [ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._CreateCompatibleBitmap_12
sub esp, 0xc
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x9c]
mov dword [esp], eax
call sym._SelectObject_8
sub esp, 8
mov dword [ebx + 0xac], eax
mov dword [esp], esi
call sym._CreateCompatibleDC_4
push edi
mov dword [ebx + 0xa0], eax
mov eax, dword [ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._CreateCompatibleBitmap_12
sub esp, 0xc
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xa0]
mov dword [esp], eax
call sym._SelectObject_8
sub esp, 8
mov dword [ebx + 0xb0], eax
mov dword [esp], esi
call sym._CreateCompatibleDC_4
push edx
mov dword [ebx + 0xa4], eax
mov eax, dword [ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._CreateCompatibleBitmap_12
sub esp, 0xc
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xa4]
mov dword [esp], eax
call sym._SelectObject_8
sub esp, 8
mov dword [ebx + 0xb4], eax
mov dword [esp], esi
call sym._CreateCompatibleDC_4
push ecx
mov dword [ebx + 0xa8], eax
mov eax, dword [ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._CreateCompatibleBitmap_12
sub esp, 0xc
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xa8]
mov dword [esp], eax
call sym._SelectObject_8
sub esp, 8
mov dword [ebx + 0xb8], eax
mov eax, dword [ebx + 0x304]
mov dword [esp], eax
call sym._ReleaseMutex_4
push edi
mov dword [esp + 4], esi
mov dword [esp], ebp
call sym._ReleaseDC_8
sub esp, 8
mov dword [esp + 4], 1
mov dword [esp], ebp
call sym._ShowWindow_8
sub esp, 8
mov dword [esp], ebp
call sym._UpdateWindow_4
push ebp
mov eax, dword [ebx + 0xd4]
mov dword [esp], eax
call sym._SetEvent_4
push eax
lea esi, [esp + 0x44]
jmp 0x4069ce
mov dword [esp], esi
call sym._TranslateMessage_4
push edi
mov dword [esp], esi
call sym._DispatchMessageA_4
push ebp
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._GetMessageA_16
sub esp, 0x10
test eax, eax
jne 0x4069bc
lea eax, [ebx + 0x110]
lea edi, [ebx + 0x2a0]
mov ebp, eax
mov dword [esp + 0x3c], ebx
nop
mov edx, dword [edi]
test edx, edx
je 0x406a37
mov esi, dword [edi + 0x24]
add esi, 4
mov ebx, dword [edi + 0x14]
cmp esi, ebx
jbe 0x406a2f
nop
mov edx, dword [ebx]
mov dword [esp], edx
call sym.operator_delete_void_
add ebx, 4
cmp esi, ebx
ja 0x406a1c
mov edx, dword [edi]
mov dword [esp], edx
call sym.operator_delete_void_
sub edi, 0x28
lea eax, [edi + 0x28]
cmp ebp, eax
jne 0x406a08
mov ebx, dword [esp + 0x3c]
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x406a78
mov edi, dword [ebx + 0x38]
add edi, 4
mov esi, dword [ebx + 0x28]
cmp edi, esi
jbe 0x406a70
lea esi, [esi]
mov eax, dword [esi]
mov dword [esp], eax
call sym.operator_delete_void_
add esi, 4
cmp edi, esi
ja 0x406a5c
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 0x406ac8
mov dword [esp], ebx
call sym.operator_delete_void_
mov eax, dword [esp + 0x4c]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov dword [esp], 4
call sym._GetSystemMetrics_4
push esi
mov edi, eax
jmp 0x40664e
mov dword [esp], 0
call sym._showerrorbox
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret 4
lea eax, [edx - 4]
mov ecx, dword [0x4f3874]
test ecx, ecx
jne 0x406af3
mov eax, dword [edx - 4]
lea ecx, [eax - 1]
mov dword [edx - 4], ecx
test eax, eax
jg 0x406a86
lea eax, [esp + 0x43]
mov dword [esp], eax
mov ecx, esi
call method.std::string::_Rep._M_destroy_std::allocator_char__const_
push eax
jmp 0x406a86
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call method.__gnu_cxx.__exchange_and_add_int_volatile__int_
jmp 0x406ade