Function at 0x1004585
Capabilities:
Check if file exists
Get keyboard layout

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x10095ec]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.USER32.dll_RegisterWindowMessageW]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push 0x10017dc
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], eax
call edi
xor ebx, ebx
cmp eax, ebx
mov dword [0x100a788], eax
je 0x10049ce
push 0x10017c0
call edi
cmp eax, ebx
mov dword [0x100a784], eax
je 0x10049ce
push ebx
call dword [sym.imp.USER32.dll_GetDC]
cmp eax, ebx
mov dword [ebp - 0x48], eax
je 0x10049ce
push esi
call fcn.010040da
test eax, eax
je 0x10049ce
push 0x29
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov edi, dword [sym.imp.USER32.dll_LoadCursorW]
neg eax
sbb eax, eax
add eax, 0x7f01
push eax
push ebx
call edi
push 0x7f02
push ebx
mov dword [0x100ae88], eax
call edi
push 0x10017b0
push esi
mov dword [0x100ae84], eax
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
cmp dword [0x100ae84], ebx
mov dword [0x100a9d8], eax
je 0x10049ce
cmp eax, ebx
je 0x10049ce
cmp dword [ebp + 0xc], ebx
jne 0x100465b
call fcn.010044f7
test eax, eax
je 0x10049ce
mov dword [0x100ae80], esi
mov dword [0x100a7a0], 0x54
mov dword [0x100a7a8], ebx
mov dword [0x100a7ac], ebx
mov dword [0x100a7dc], esi
call fcn.0100197d
call fcn.01003cb2
push ebx
push esi
push ebx
push ebx
push dword [0x1009a50]
mov esi, 0x10013a4
push dword [0x1009a54]
push dword [0x1009a5c]
push dword [0x1009a58]
push 0xcf0000
push esi
push str.Notepad
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov edx, eax
cmp edx, ebx
mov dword [0x1009810], edx
mov dword [0x100a7a4], edx
je 0x10049ce
mov eax, 0x80000000
cmp dword [0x1009a54], eax
je 0x100473f
cmp dword [0x1009a50], eax
je 0x100473f
xor eax, eax
push 0xb
pop ecx
lea edi, [ebp - 0xa8]
rep stosd dword es:[edi], eax
mov eax, dword [0x1009a58]
mov ecx, dword [0x1009a54]
mov dword [ebp - 0x8c], eax
add eax, ecx
mov ecx, dword [0x1009a50]
mov dword [ebp - 0x84], eax
mov eax, dword [0x1009a5c]
mov dword [ebp - 0x88], eax
add eax, ecx
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0xa8]
push eax
push edx
mov dword [ebp - 0xa8], 0x2c
call dword [sym.imp.USER32.dll_SetWindowPlacement]
mov edx, dword [0x1009810]
push 1
push edx
call dword [sym.imp.SHELL32.dll_DragAcceptFiles]
mov edi, dword [sym.imp.USER32.dll_GetClientRect]
lea eax, [ebp - 0x7c]
push eax
push dword [0x1009810]
call edi
mov eax, dword [ebp - 0x70]
push ebx
push dword [ebp - 0x54]
add eax, 0xffffff9c
push 0xf
push dword [0x1009810]
push eax
push dword [ebp - 0x74]
mov eax, dword [0x1009830]
neg eax
push ebx
sbb eax, eax
push ebx
and eax, 0xfff00000
add eax, 0x50300104
push eax
push esi
push 0x10017a4
push 0x200
call dword [sym.imp.USER32.dll_CreateWindowExW]
cmp eax, ebx
mov dword [0x1009818], eax
je 0x10049ce
mov eax, dword [0x1009820]
neg eax
push 0x401
push dword [0x1009810]
sbb eax, eax
and eax, 0x10000000
push esi
or eax, 0x44800000
push eax
call dword [sym.imp.COMCTL32.dll_CreateStatusWindowW]
cmp eax, ebx
mov dword [0x1009814], eax
je 0x10049ce
push 1
call fcn.01001c62
lea eax, [ebp - 0x6c]
push eax
push dword [0x1009814]
call edi
mov eax, dword [ebp - 0x60]
sub eax, dword [ebp - 0x68]
push 4
mov dword [0x100a9e0], eax
mov eax, dword [ebp - 0x64]
sub eax, dword [ebp - 0x6c]
pop ecx
lea eax, [eax + eax*2]
cdq
idiv ecx
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
or dword [ebp - 0x58], 0xffffffff
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x5c]
push eax
push 2
push 0x404
push dword [0x1009814]
call esi
push ebx
push dword [0x1009830]
push 0xc8
push dword [0x1009818]
call esi
cmp dword [0x1009830], ebx
je 0x1004860
push dword [0x1009810]
call dword [sym.imp.USER32.dll_GetMenu]
push 1
push 0x1b
push 3
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call dword [sym.imp.USER32.dll_EnableMenuItem]
push 0x2d0
push 0x5a
push dword [ebp - 0x48]
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push eax
push dword [section..data]
call dword [sym.imp.KERNEL32.dll_MulDiv]
neg eax
mov edi, 0x100ae20
push edi
mov dword [0x100ae20], eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
push eax
push dword [ebp - 0x48]
mov dword [0x100ae7c], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x44]
push eax
push 0x20
push dword [ebp - 0x48]
call dword [sym.imp.GDI32.dll_GetTextFaceW]
push dword [ebp - 0x4c]
push dword [ebp - 0x48]
call dword [sym.imp.GDI32.dll_SelectObject]
push 0x100ae3c
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10048fc
push edi
push 0x10044db
push 0x100ae3c
push dword [ebp - 0x48]
call dword [sym.imp.GDI32.dll_EnumFontsW]
push dword [0x100ae7c]
call dword [sym.imp.GDI32.dll_DeleteObject]
push edi
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
mov dword [0x100ae7c], eax
push ebx
push dword [0x100ae7c]
push 0x30
push dword [0x1009818]
call esi
push dword [ebp - 0x48]
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
push 2
push 0x42
mov word [0x100ab00], bx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push ebx
push ebx
push 0xc5
push dword [0x1009818]
mov dword [0x100ae8c], eax
call dword [sym.imp.USER32.dll_PostMessageW]
push dword [0x1009028]
call fcn.01002a75
push dword [ebp + 0x14]
push dword [0x1009810]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x100ae88]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [ebp - 0x50]
call fcn.0100419a
or dword [0x1009a60], 0xffffffff
mov ecx, 0x100179c
mov edi, eax
call fcn.01003f6c
test eax, eax
jne 0x100498d
mov dword [0x1009a60], ebx
jmp 0x10049b0
mov eax, edi
mov ecx, 0x1001794
call fcn.01003f6c
test eax, eax
jne 0x10049a7
mov dword [0x1009a60], 1
cmp dword [0x1009a60], 0xffffffff
je 0x10049bb
add edi, 4
push edi
call fcn.0100419a
mov edi, eax
push edi
call fcn.010041be
cmp eax, ebx
je 0x10049df
cmp eax, 2
jne 0x1004abb
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01007167
leave
ret 0x10
push dword [ebp + 0x14]
push edi
call fcn.01004319
test eax, eax
je 0x1004a01
push ebx
push ebx
push 0x10
push dword [0x1009810]
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x1004b78
cmp word [edi], bx
je 0x1004abb
push edi
mov edi, 0x100ac00
push edi
call fcn.01003fb9
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [0x100a780], eax
jne 0x1004aaf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1004a88
push 0x33
push edi
push dword [0x1009020]
push dword [0x100903c]
push dword [0x1009810]
call fcn.01001f90
cmp eax, 2
je 0x10049ce
cmp eax, 6
jne 0x1004aa6
push ebx
push 0x80
push 4
push ebx
push 3
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x100a780], eax
jmp 0x1004aa6
push edi
call fcn.01004e40
push dword [0x1009028]
call fcn.01002a75
push dword [0x1009028]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [0x100a780], 0xffffffff
je 0x1004abb
push dword [0x1009a60]
push edi
call fcn.01005199
push 0x100a8e0
call fcn.01004478
push 0x100a840
call fcn.01004478
mov edx, dword [0x1009810]
push 0x16
pop ecx
xor eax, eax
push 0xa
mov edi, 0x100a980
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x54]
pop ecx
mov dword [0x100a988], eax
xor eax, eax
mov edi, 0x100a800
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x4c]
push eax
push 0xb0
push dword [0x1009818]
mov dword [0x100a980], 0x58
mov dword [0x100a984], edx
mov dword [0x100a9a0], 0x104
mov dword [0x100a800], 0x28
mov dword [0x100a804], edx
call esi
push dword [ebp - 0x50]
push dword [ebp - 0x4c]
push 0xb1
push dword [0x1009818]
call esi
push ebx
push ebx
push 0xb7
push dword [0x1009818]
call esi
push ebx
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
and ax, 0x3ff
cmp ax, 0x11
jne 0x1004b78
push 1
push 1
push 0xd8
push dword [0x1009818]
call esi
xor eax, eax
inc eax
jmp 0x10049d0