Function at 0x404060
Capabilities:
Enumerate gui resources
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xab0
push ebx
push esi
push edi
lea eax, [ebp - 0x28c]
push eax
lea eax, [ebp - 0x69c]
push eax
lea eax, [ebp - 0x8a4]
push eax
lea eax, [ebp - 0x494]
push eax
call fcn.00407a90
mov ebx, eax
push str.__ATPad_prog_mutex__
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x43bf20], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov word [0x43f3b0], 0
mov eax, ebx
and eax, 8
cmp eax, 8
jne 0x404128
mov ecx, 0x43f3b0
lea edx, [ebp - 0x494]
push ecx
sub ecx, edx
mov ax, word [edx]
mov word [ecx + edx], ax
add edx, 2
test ax, ax
jne 0x4040cc
pop eax
push str.atpad.ini
push 0x43f3b0
call fcn.0041f1f0
add esp, 8
test eax, eax
jne 0x404137
push 0x43f3b0
call fcn.00407cf0
test eax, eax
je 0x404114
push str.atpad.ini
push 0x43f3b0
call fcn.0041e5f0
add esp, 8
jmp 0x404137
push str._atpad.ini
push 0x43f3b0
call fcn.0041e5f0
add esp, 8
jmp 0x404137
push str._atpad.ini
push 0x43f3b0
call fcn.00407a60
push str._atpad.snps
push 0x43f7c0
call fcn.00407a60
call fcn.0040a8e0
cmp esi, 0xb7
jne 0x404234
mov eax, ebx
and eax, 1
cmp eax, 1
jne 0x404195
mov eax, ebx
and eax, 2
cmp eax, 2
jne 0x404174
push 2
call fcn.0040ebf0
jmp 0x40418e
mov eax, ebx
and eax, 4
cmp eax, 4
jne 0x404187
push 4
call fcn.0040ebf0
jmp 0x40418e
push 1
call fcn.0040ebf0
xor eax, eax
jmp 0x40465b
cmp dword [0x43f9e4], 0
je 0x404234
mov dword [ebp - 0x8a8], 0
lea eax, [ebp - 0x8a8]
push eax
push 0x40ecb0
call dword [sym.imp.USER32.dll_EnumWindows]
cmp dword [ebp - 0x8a8], 0
je 0x40422d
cmp ebx, 0x40
jne 0x4041f9
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomW]
movzx eax, ax
mov dword [ebp - 0x8ac], eax
push eax
push 0
push 0x744
mov eax, dword [ebp - 0x8a8]
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x40422d
push 0xfffffffffffffff0
mov eax, dword [ebp - 0x8a8]
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
and eax, 0x20000000
cmp eax, 0x20000000
jne 0x40422d
push 0x203
push 0
push 0x405
mov eax, dword [ebp - 0x8a8]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
xor eax, eax
jmp 0x40465b
mov eax, ebx
and eax, 0x20
cmp eax, 0x20
jne 0x40425e
mov ecx, 0x43f5b8
lea edx, [ebp - 0x69c]
push ecx
sub ecx, edx
mov ax, word [edx]
mov word [ecx + edx], ax
add edx, 2
test ax, ax
jne 0x40424c
pop eax
jmp 0x404270
push 0x104
push 0x43f5b8
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [ebp + 8]
mov dword [0x440478], eax
mov dword [ebp - 0x74], 8
mov dword [ebp - 0x70], 0xff
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push str.riched20.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
call fcn.0040df60
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x44019c], eax
lea edx, [ebp - 0x4c]
mov ecx, 0x30
xor eax, eax
push edi
mov edi, edx
rep stosb byte es:[edi], al
pop edi
mov eax, edx
mov dword [ebp - 0x4c], 0x30
mov dword [ebp - 0x24], str.__ATPad__Application__Main__Window__Class__
mov dword [ebp - 0x44], 0x404670
mov dword [ebp - 0x48], 3
mov eax, dword [0x440478]
mov dword [ebp - 0x38], eax
push 1
mov eax, dword [0x440478]
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
mov dword [ebp - 0x34], eax
push 1
mov eax, dword [0x440478]
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
mov dword [ebp - 0x20], eax
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 0xd
mov dword [ebp - 0x28], 0x7d1
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
test ax, ax
jne 0x404350
mov eax, 1
jmp 0x40465b
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x44], 0x40eef0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], str.Win32MDIChild
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
test ax, ax
jne 0x404385
mov eax, 1
jmp 0x40465b
call fcn.00409a00
call fcn.00410760
test eax, eax
je 0x40439a
call fcn.00409710
jmp 0x4043a4
call fcn.00409920
call fcn.004096b0
lea eax, [ebp - 0x6c]
push eax
call fcn.0040a820
fld qword [ebp - 0x6c]
call fcn.0041f270
mov dword [ebp - 0x8a8], eax
fld qword [ebp - 0x64]
call fcn.0041f270
push 0
mov edx, dword [0x440478]
push edx
push 0
push 0
mov edx, dword [ebp - 0x58]
push edx
mov edx, dword [ebp - 0x5c]
push edx
push eax
mov eax, dword [ebp - 0x8a8]
push eax
push 0x6cf0000
push 0x428116
push str.__ATPad__Application__Main__Window__Class__
push 0x10
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [0x43f09c], eax
cmp dword [0x43f09c], 0
jne 0x40440f
mov eax, 1
jmp 0x40465b
push 1
push str.SAVE_ON_EXIT
mov eax, dword [0x43f09c]
push eax
call dword [sym.imp.USER32.dll_SetPropW]
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [0x43f09c]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [ebp - 0x54], 0
je 0x404450
push 0
push 0xf030
push 0x112
mov eax, dword [0x43f09c]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [0x43f09c]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [0x43bb1c]
push eax
mov eax, dword [0x43bb20]
push eax
call dword [sym.imp.USER32.dll_CreateAcceleratorTableW]
mov dword [0x43bb18], eax
lea eax, [ebp - 0x84]
push eax
mov eax, dword [0x43bf14]
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
push 0xa0
mov eax, dword [ebp - 0x78]
sub eax, dword [ebp - 0x80]
push eax
mov eax, dword [0x43f09c]
push eax
call fcn.00418eb0
push 1
mov eax, dword [0x43fa14]
push eax
call fcn.004162f0
test eax, eax
je 0x4044c6
push 0
push 0x17ac
push 0x111
mov eax, dword [0x43f09c]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 2
mov eax, dword [0x43fa14]
push eax
call fcn.004162f0
test eax, eax
je 0x4044ef
push 0
push 0x17ad
push 0x111
mov eax, dword [0x43f09c]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
cmp ebx, 0x40
jne 0x404580
call fcn.0040ba40
mov edi, eax
lea eax, [ebp - 0xab0]
push eax
lea eax, [ebp - 0x28c]
push eax
call fcn.0040e620
lea ecx, [edi + 0x114]
lea edx, [ebp - 0x28c]
push ecx
sub ecx, edx
mov ax, word [edx]
mov word [ecx + edx], ax
add edx, 2
test ax, ax
jne 0x404521
pop eax
lea ecx, [edi + 0x14]
lea edx, [ebp - 0xab0]
push ecx
sub ecx, edx
mov ax, word [edx]
mov word [ecx + edx], ax
add edx, 2
test ax, ax
jne 0x40453d
pop eax
push 0
push edi
lea eax, [ebp - 0xab0]
push eax
lea eax, [ebp - 0x28c]
push eax
mov eax, dword [0x43f09c]
push eax
call fcn.0040e650
push 1
push 0
push 0
mov eax, dword [0x43bf18]
push eax
call dword [sym.imp.USER32.dll_RedrawWindow]
call fcn.0040df60
push 0x428116
push 0x43bb4c
push 1
mov eax, dword [0x440478]
push eax
mov eax, dword [0x43f09c]
push eax
call fcn.00418ae0
cmp dword [0x43fa0c], 0
je 0x404627
mov dword [0x440150], 0
mov eax, dword [0x43f09c]
push eax
call fcn.004164d0
jmp 0x404627
mov eax, dword [0x43c484]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4045e5
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [0x43c484]
push eax
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x404627
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [0x43bb18]
push eax
mov eax, dword [0x43f09c]
push eax
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x404627
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [0x440474]
push eax
call dword [sym.imp.USER32.dll_TranslateMDISysAccel]
test eax, eax
jne 0x404627
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x4045c1
mov eax, dword [0x43bb18]
push eax
call dword [sym.imp.USER32.dll_DestroyAcceleratorTable]
mov eax, dword [0x43f09c]
push eax
call fcn.00409a30
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10