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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x1009604]
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 0x10017cc
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], eax
call edi
xor ebx, ebx
cmp eax, ebx
mov dword [0x100a488], eax
je 0x10049ae
push 0x10017b0
call edi
cmp eax, ebx
mov dword [0x100a484], eax
je 0x10049ae
push ebx
call dword [sym.imp.USER32.dll_GetDC]
cmp eax, ebx
mov dword [ebp - 0x48], eax
je 0x10049ae
push esi
call fcn.010040ba
test eax, eax
je 0x10049ae
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 [0x100ab88], eax
call edi
push 0x10017a0
push esi
mov dword [0x100ab84], eax
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
cmp dword [0x100ab84], ebx
mov dword [0x100a6d8], eax
je 0x10049ae
cmp eax, ebx
je 0x10049ae
cmp dword [ebp + 0xc], ebx
jne 0x100463b
call fcn.010044d7
test eax, eax
je 0x10049ae
mov dword [0x100ab80], esi
mov dword [0x100a4a0], 0x54
mov dword [0x100a4a8], ebx
mov dword [0x100a4ac], ebx
mov dword [0x100a4dc], esi
call fcn.0100195d
call fcn.01003c92
push ebx
push esi
push ebx
push ebx
push dword [0x1009a70]
mov esi, 0x1001394
push dword [0x1009a74]
push dword [0x1009a7c]
push dword [0x1009a78]
push 0xcf0000
push esi
push str.Notepad
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov edx, eax
cmp edx, ebx
mov dword [0x1009830], edx
mov dword [0x100a4a4], edx
je 0x10049ae
mov eax, 0x80000000
cmp dword [0x1009a74], eax
je 0x100471f
cmp dword [0x1009a70], eax
je 0x100471f
xor eax, eax
push 0xb
pop ecx
lea edi, [ebp - 0xa8]
rep stosd dword es:[edi], eax
mov eax, dword [0x1009a78]
mov ecx, dword [0x1009a74]
mov dword [ebp - 0x8c], eax
add eax, ecx
mov ecx, dword [0x1009a70]
mov dword [ebp - 0x84], eax
mov eax, dword [0x1009a7c]
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 [0x1009830]
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 [0x1009830]
call edi
mov eax, dword [ebp - 0x70]
push ebx
push dword [ebp - 0x54]
add eax, 0xffffff9c
push 0xf
push dword [0x1009830]
push eax
push dword [ebp - 0x74]
mov eax, dword [0x1009850]
neg eax
push ebx
sbb eax, eax
push ebx
and eax, 0xfff00000
add eax, 0x50300104
push eax
push esi
push 0x1001794
push 0x200
call dword [sym.imp.USER32.dll_CreateWindowExW]
cmp eax, ebx
mov dword [0x1009838], eax
je 0x10049ae
mov eax, dword [0x1009840]
neg eax
push 0x401
push dword [0x1009830]
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 [0x1009834], eax
je 0x10049ae
push 1
call fcn.01001c42
lea eax, [ebp - 0x6c]
push eax
push dword [0x1009834]
call edi
mov eax, dword [ebp - 0x60]
sub eax, dword [ebp - 0x68]
push 4
mov dword [0x100a6e0], 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 [0x1009834]
call esi
push ebx
push dword [0x1009850]
push 0xc8
push dword [0x1009838]
call esi
cmp dword [0x1009850], ebx
je 0x1004840
push dword [0x1009830]
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 [0x1009018]
call dword [sym.imp.KERNEL32.dll_MulDiv]
neg eax
mov edi, 0x100ab20
push edi
mov dword [0x100ab20], eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
push eax
push dword [ebp - 0x48]
mov dword [0x100ab7c], 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 0x100ab3c
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10048dc
push edi
push 0x10044bb
push 0x100ab3c
push dword [ebp - 0x48]
call dword [sym.imp.GDI32.dll_EnumFontsW]
push dword [0x100ab7c]
call dword [sym.imp.GDI32.dll_DeleteObject]
push edi
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
mov dword [0x100ab7c], eax
push ebx
push dword [0x100ab7c]
push 0x30
push dword [0x1009838]
call esi
push dword [ebp - 0x48]
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
push 2
push 0x42
mov word [0x100a800], bx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push ebx
push ebx
push 0xc5
push dword [0x1009838]
mov dword [0x100ab8c], eax
call dword [sym.imp.USER32.dll_PostMessageW]
push dword [0x1009040]
call fcn.01002a55
push dword [ebp + 0x14]
push dword [0x1009830]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x100ab88]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [ebp - 0x50]
call fcn.0100417a
or dword [0x1009a80], 0xffffffff
mov ecx, 0x100178c
mov edi, eax
call fcn.01003f4c
test eax, eax
jne 0x100496d
mov dword [0x1009a80], ebx
jmp 0x1004990
mov eax, edi
mov ecx, 0x1001784
call fcn.01003f4c
test eax, eax
jne 0x1004987
mov dword [0x1009a80], 1
cmp dword [0x1009a80], 0xffffffff
je 0x100499b
add edi, 4
push edi
call fcn.0100417a
mov edi, eax
push edi
call fcn.0100419e
cmp eax, ebx
je 0x10049bf
cmp eax, 2
jne 0x1004a9b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01007147
leave
ret 0x10
push dword [ebp + 0x14]
push edi
call fcn.010042f9
test eax, eax
je 0x10049e1
push ebx
push ebx
push 0x10
push dword [0x1009830]
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x1004b58
cmp word [edi], bx
je 0x1004a9b
push edi
mov edi, 0x100a900
push edi
call fcn.01003f99
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 [0x100a480], eax
jne 0x1004a8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1004a68
push 0x33
push edi
push dword [0x1009038]
push dword [0x1009054]
push dword [0x1009830]
call fcn.01001f70
cmp eax, 2
je 0x10049ae
cmp eax, 6
jne 0x1004a86
push ebx
push 0x80
push 4
push ebx
push 3
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x100a480], eax
jmp 0x1004a86
push edi
call fcn.01004e20
push dword [0x1009040]
call fcn.01002a55
push dword [0x1009040]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [0x100a480], 0xffffffff
je 0x1004a9b
push dword [0x1009a80]
push edi
call fcn.01005179
push 0x100a5e0
call fcn.01004458
push 0x100a540
call fcn.01004458
mov edx, dword [0x1009830]
push 0x16
pop ecx
xor eax, eax
push 0xa
mov edi, 0x100a680
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x54]
pop ecx
mov dword [0x100a688], eax
xor eax, eax
mov edi, 0x100a500
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x4c]
push eax
push 0xb0
push dword [0x1009838]
mov dword [0x100a680], 0x58
mov dword [0x100a684], edx
mov dword [0x100a6a0], 0x104
mov dword [0x100a500], 0x28
mov dword [0x100a504], edx
call esi
push dword [ebp - 0x50]
push dword [ebp - 0x4c]
push 0xb1
push dword [0x1009838]
call esi
push ebx
push ebx
push 0xb7
push dword [0x1009838]
call esi
push ebx
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
and ax, 0x3ff
cmp ax, 0x11
jne 0x1004b58
push 1
push 1
push 0xd8
push dword [0x1009838]
call esi
xor eax, eax
inc eax
jmp 0x10049b0