Function at 0x401840
Capabilities:
Check if file exists
Get file attributes
Hide graphical window
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x374
push esi
mov word [ebp - 0x370], 0
mov dword [ebp - 0x36c], 0
push 0x4013a4
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
jne 0x40187c
jmp 0x401b6c
push 0x4013ac
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x374], eax
push 0x4013bc
mov ecx, dword [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x358], eax
cmp dword [ebp - 0x374], 0
je 0x4018be
cmp dword [ebp - 0x358], 0
jne 0x4018c3
jmp 0x401b6c
mov dword [ebp - 0x34c], 0x286
mov dword [ebp - 0x354], 0x1de
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov dword [ebp - 0x35c], eax
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x35c]
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x34c]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x32c], eax
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x354]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x360], eax
call dword [ebp - 0x374]
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x354]
push ecx
mov edx, dword [ebp - 0x34c]
push edx
mov eax, dword [ebp - 0x360]
push eax
mov ecx, dword [ebp - 0x32c]
push ecx
push 0x80080000
push 0x4013cc
push 0x4013f4
push 8
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [ebp - 0x368], eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x350], eax
push 0x6e
mov edx, dword [ebp - 0x350]
push edx
call dword [sym.imp.USER32.dll_LoadIconA]
push eax
push 1
push 0x80
mov eax, dword [ebp - 0x368]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x401400
mov ecx, dword [ebp - 0x368]
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 0x401b74
mov edx, dword [ebp - 0x368]
push edx
call dword [ebp - 0x358]
cmp dword [0x401b74], 0
je 0x401b57
push 0
call dword [sym.imp.USER32.dll_ShowCursor]
push 0x104
lea eax, [ebp - 0x328]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [ebp - 0x364], eax
cmp dword [ebp - 0x364], 0
je 0x401b4f
lea esi, [ebp - 0x328]
add esi, eax
mov dword [esi - 4], 0x6677732e
lea ecx, [ebp - 0x328]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401a34
push 0x40141c
push 0x401420
lea edx, [ebp - 0x328]
push edx
push 0
call fcn.00401760
push 0x104
lea eax, [ebp - 0x218]
push eax
mov ecx, dword [ebp - 0x364]
push ecx
lea edx, [ebp - 0x328]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x364]
mov word [ebp + eax*2 - 0x218], 0
push 0
mov ecx, dword [0x401b74]
mov edx, dword [ecx]
mov eax, dword [0x401b74]
push eax
mov ecx, dword [edx + 0x48]
call ecx
lea edx, [ebp - 0x218]
push edx
mov eax, dword [0x401b74]
mov ecx, dword [eax]
mov edx, dword [0x401b74]
push edx
mov eax, dword [ecx + 0x58]
call eax
lea ecx, [ebp - 0x36c]
push ecx
mov edx, dword [0x401b74]
mov eax, dword [edx]
mov ecx, dword [0x401b74]
push ecx
mov edx, dword [eax + 0x20]
call edx
push 0x40004
mov eax, dword [ebp - 0x350]
push eax
push 0x65
call dword [sym.imp.WINMM.dll_PlaySoundA]
push 5
mov ecx, dword [ebp - 0x368]
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
push 0xffffffffffffffff
mov edx, dword [0x401b74]
mov eax, dword [edx]
mov ecx, dword [0x401b74]
push ecx
mov edx, dword [eax + 0x28]
call edx
cmp dword [ebp - 0x36c], 0
jle 0x401b4f
push 0
push 0
mov eax, dword [ebp - 0x368]
push eax
lea ecx, [ebp - 0x348]
push ecx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jle 0x401b4f
lea edx, [ebp - 0x348]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
lea eax, [ebp - 0x370]
push eax
mov ecx, dword [0x401b74]
mov edx, dword [ecx]
mov eax, dword [0x401b74]
push eax
mov ecx, dword [edx + 0x24]
call ecx
movsx edx, word [ebp - 0x370]
test edx, edx
je 0x401b4b
cmp dword [ebp - 0x344], 0x12
jne 0x401b4d
jmp 0x401b4f
jmp 0x401af4
push 1
call dword [sym.imp.USER32.dll_ShowCursor]
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
mov esp, ebp
pop ebp
ret