Function at 0x401040
Capabilities:
Check if file exists
Create pipe
Get geographical location
Identify system language via api
Open clipboard
Read clipboard data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6dc
mov eax, dword [0x45305c]
xor eax, esp
mov dword [esp + 0x6d8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor esi, esi
push 0x30
mov dword [esp + 0x40], eax
mov dword [0x494918], eax
lea eax, [esp + 0x48]
push esi
push eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x4c], 0x77
call fcn.00402150
mov ebx, dword [ebp + 0x14]
mov eax, dword [esp + 0x48]
mov ecx, dword [0x494914]
add esp, 0xc
lea edx, [esp + 0x44]
push edx
push esi
push ebx
push eax
mov dword [esp + 0x54], 0x30
mov dword [esp + 0x58], ecx
mov dword [esp + 0x7c], 0x64
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
mov dword [esp + 0x38], eax
cmp eax, esi
je 0x4010cc
mov ecx, dword [0x494914]
mov dword [0x494910], ecx
jmp 0x4010d2
inc dword [0x494914]
mov dword [0x49491c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, esi
je 0x4010ed
mov dword [esp + 0x40], 0x153
jmp 0x4010f5
mov dword [esp + 0x18], 0x92
add edi, 0x727
lea edx, [edi - 0x476]
mov dword [esp + 0x34], edi
mov dword [0x494920], edi
mov dword [0x494910], edx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
mov dword [0x494928], eax
call dword [sym.imp.USER32.dll_SetFocus]
mov ebx, eax
push 0x40e236
lea eax, [esp + 0x464]
push 0x27f
push eax
mov dword [esp + 0x20], ebx
mov dword [0x494924], ebx
call fcn.004021ca
lea ecx, [esp + 0x34]
push ecx
call fcn.00402589
lea edx, [esp + 0x38]
push edx
call fcn.00402531
add esp, 0x14
cmp edi, 0x578
jle 0x40116a
mov esi, 0x11
mov eax, dword [0x494910]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x3c]
add eax, edi
push eax
lea ecx, [esp + 0xbc]
push ecx
push edx
call dword [sym.imp.SHELL32.dll_ExtractIconA]
test eax, eax
je 0x4011af
push 0x24d
call fcn.00401c59
mov eax, dword [esp + 0x44]
add esp, 4
add eax, edi
lea ecx, [esi + eax + 0x22]
mov dword [0x494910], eax
mov dword [esp + 0x1c], ecx
jmp 0x4011bb
mov edx, ebx
add edx, edx
lea eax, [esi + edx*8 + 0x10]
mov dword [esp + 0x1c], eax
movzx eax, bl
lea ecx, [eax + 0x6a]
mov dword [esp + 0x20], ecx
mov edx, 0x68
lea ecx, [eax + 1]
lea esi, [eax + 1]
mov edi, 0x15
imul esi, esi, 0xff
sub edx, eax
sub edi, eax
mov eax, dword [esp + 0x3c]
xor ebx, ebx
shl ecx, 4
add eax, 0x1000
mov dword [esp + 0x28], ebx
je 0x40122d
mov bl, byte [esp + 0x20]
cmp byte [eax], bl
jne 0x401226
movzx ebx, dl
cmp word [eax + 2], bx
jne 0x401226
movzx ebx, cl
cmp word [eax + 4], bx
jne 0x401226
cmp byte [eax + 6], 0
jne 0x401226
movzx ebx, byte [esp + 0x20]
cmp word [eax + 7], bx
jne 0x401226
movzx ebx, byte [eax + 9]
cmp ebx, esi
je 0x401254
inc eax
jne 0x4011f3
mov ebx, dword [esp + 0x28]
sub edi, dword [esp + 0x14]
add ecx, edi
lea eax, [esi + edx]
add eax, dword [esp + 0x14]
imul eax, esi
cmp ebx, dword [0x494920]
jbe 0x40127f
mov edx, dword [esp + 0x14]
add edx, 2
imul edx, esi
shl edx, 0xc
jmp 0x401284
mov eax, dword [eax + 0xb]
mov ebx, dword [eax]
test ebx, ebx
je 0x40122d
mov eax, dword [esp + 0x14]
add eax, 4
imul ecx, eax
shl ecx, 0xc
cmp ebx, dword [esp + 0x3c]
jbe 0x401233
mov eax, esi
sub eax, dword [esp + 0x20]
sub eax, dword [esp + 0x14]
shl eax, 0xc
jmp 0x40123d
mov edx, ecx
shr edx, 0xc
push edx
push eax
push ecx
call ebx
push 0xa9
lea ecx, [esp + 0xbc]
push 0
push ecx
mov dword [esp + 0x34], eax
call fcn.00402150
mov edi, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x9c]
push edx
push 1
push edi
call dword [sym.imp.USER32.dll_GetScrollInfo]
cmp dword [esp + 0x34], 0
mov esi, eax
je 0x4012ea
mov ecx, dword [0x494914]
push 1
lea eax, [esp + 0xa0]
push eax
push ecx
push edi
call dword [sym.imp.USER32.dll_SetScrollInfo]
test esi, esi
je 0x4012e5
add dword [esp + 0x1c], 0x39
jmp 0x4012ea
add dword [esp + 0x1c], 0x14
mov edx, dword [esp + 0x34]
mov eax, dword [0x494920]
mov ecx, dword [0x494910]
movzx esi, dx
lea ecx, [eax + ecx + 1]
imul ecx, esi
mov esi, dword [0x494914]
shr edx, 0x10
lea eax, [eax + esi + 1]
imul eax, edx
lea edx, [eax + eax*2]
mov dword [0x494a1c], eax
mov dword [0x494a24], eax
lea eax, [esp + 0xb8]
push eax
mov dword [0x494a18], ecx
mov dword [0x494a20], ecx
mov dword [0x494a28], ecx
mov dword [0x494a2c], edx
call dword [sym.imp.GDI32.dll_AddFontResourceA]
test eax, eax
je 0x401363
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6d8]
xor ecx, esp
call fcn.00401c6f
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [0x494920]
add dword [esp + 0x1c], 0xa
xor esi, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x24], esi
lea ecx, [esi + 0x10]
cmp ebx, esi
jle 0x4013d3
mov eax, dword [0x494918]
lea edi, [ebx + 1]
cdq
idiv edi
mov edx, esi
mov edi, eax
jmp 0x401394
mov edx, dword [esp + 0x10]
xor eax, eax
test edi, edi
jle 0x4013af
lea ebx, [ebx]
test ebx, ebx
jne 0x4013a6
add edx, eax
inc eax
cmp eax, edi
jl 0x4013a0
mov dword [esp + 0x10], edx
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*2]
mov eax, esi
sub eax, edx
jne 0x4013ca
inc dword [esp + 0x24]
inc esi
cmp esi, ebx
jl 0x401390
mov edi, dword [esp + 0x14]
mov edx, dword [0x49491c]
sub edx, dword [esp + 0x18]
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x10]
imul edx, ebx
mov ebx, dword [0x494910]
add eax, esi
cmp eax, edx
jne 0x4013fa
add dword [0x494914], ebx
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x1c]
jle 0x40141b
cdq
and edx, 0xf
add eax, edx
sar eax, 4
sub ecx, esi
add edi, 0x10
mov dword [esp + 0x24], eax
imul ecx, edi
jmp 0x401432
mov edx, dword [0x494914]
lea eax, [ebx + edx]
cmp eax, dword [0x494928]
jle 0x401432
inc dword [0x494914]
mov edi, dword [esp + 0x40]
mov edx, dword [esp + 0x28]
sub edi, ebx
add edi, dword [esp + 0x18]
xor eax, eax
cmp edi, edx
je 0x401464
mov edi, 0x10
sub edi, dword [0x494924]
inc esi
imul edi, esi
mov esi, dword [esp + 0x1c]
imul ecx, edi
cmp dword [esp + 0x34], esi
jle 0x401464
mov eax, edx
imul ecx, dword [esp + 0x24]
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
xor esi, esi
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x8c], esi
mov dword [esp + 0x90], edx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x10], 0x1a
lea ebx, [ebx]
mov ecx, dword [esp + 0x10]
cmp byte [esp + ecx + 0xb8], 0x5a
jne 0x4015a6
lea eax, [esp + 0x20]
mov edi, ecx
mov dword [esp + 0x20], edi
cmp eax, edx
jae 0x401537
mov ecx, eax
cmp esi, ecx
ja 0x401537
mov edi, eax
sub edi, esi
sar edi, 2
cmp edx, ebx
jne 0x40152c
mov eax, edx
sub eax, esi
sar eax, 2
cmp eax, 0x3ffffffe
ja 0x4015d8
mov ecx, ebx
sub ecx, esi
inc eax
sar ecx, 2
cmp eax, ecx
jbe 0x40152c
mov edx, ecx
shr edx, 1
mov esi, 0x3fffffff
sub esi, edx
cmp esi, ecx
jae 0x401502
xor ecx, ecx
jmp 0x401504
add ecx, edx
cmp ecx, eax
jae 0x40150a
mov ecx, eax
push ecx
lea esi, [esp + 0x90]
call fcn.00401ad0
mov ebx, dword [esp + 0x94]
mov edx, dword [esp + 0x90]
mov esi, dword [esp + 0x8c]
test edx, edx
je 0x40159c
mov eax, dword [esi + edi*4]
mov dword [edx], eax
jmp 0x40159c
cmp edx, ebx
jne 0x401596
mov eax, edx
sub eax, esi
sar eax, 2
cmp eax, 0x3ffffffe
ja 0x4015d8
mov ecx, ebx
sub ecx, esi
inc eax
sar ecx, 2
cmp eax, ecx
jbe 0x401596
mov edx, ecx
shr edx, 1
mov esi, 0x3fffffff
sub esi, edx
cmp esi, ecx
jae 0x40156c
xor ecx, ecx
jmp 0x40156e
add ecx, edx
cmp ecx, eax
jae 0x401574
mov ecx, eax
push ecx
lea esi, [esp + 0x90]
call fcn.00401ad0
mov ebx, dword [esp + 0x94]
mov edx, dword [esp + 0x90]
mov esi, dword [esp + 0x8c]
test edx, edx
je 0x40159c
mov dword [edx], edi
add edx, 4
mov dword [esp + 0x90], edx
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, 0x1aa
jb 0x4014a0
test esi, esi
je 0x4015c7
push esi
call fcn.00401c64
add esp, 4
cmp dword [esp + 0x14], 0
je 0x4015e2
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x24], ecx
jmp 0x4015ea
push str.vector_T__too_long
call fcn.00401beb
mov edx, dword [esp + 0x28]
mov dword [esp + 0x24], edx
mov edi, dword [0x494920]
mov ecx, dword [0x49491c]
xor esi, esi
xor edx, edx
mov dword [esp + 0x10], 0
mov dword [esp + 0x20], esi
test edi, edi
jle 0x40164d
mov eax, dword [esp + 0x38]
neg eax
mov dword [esp + 0x28], eax
mov eax, ecx
sub eax, dword [esp + 0x18]
imul eax, edi
mov edi, dword [0x494914]
test dl, 3
jne 0x40162c
inc dword [esp + 0x10]
cmp dword [esp + 0x28], eax
jne 0x40163c
mov ebx, dword [0x494910]
lea edi, [edi + ebx + 1]
inc edx
cmp edx, dword [0x494920]
jl 0x401623
mov dword [0x494914], edi
jmp 0x401653
mov edi, dword [0x494914]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x1c]
sub eax, ecx
cmp eax, ebx
jle 0x4016ab
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x38]
add eax, 2
lea esi, [edx + 1]
imul eax, esi
mov esi, dword [0x494910]
add esi, edi
cmp esi, dword [0x494928]
jle 0x401689
inc edi
mov dword [0x494914], edi
mov esi, ebx
mov dword [esp + 0x20], esi
test edx, edx
jne 0x4016af
mov edx, dword [esp + 0x34]
cmp dword [esp + 0x14], edx
je 0x4016af
lea esi, [eax + 1]
imul esi, edx
add esi, ebx
mov dword [esp + 0x20], esi
jmp 0x4016af
mov dword [esp + 0x1c], esi
mov edx, dword [0x494920]
mov eax, dword [esp + 0x10]
add eax, edx
cmp eax, dword [0x494928]
je 0x4016dd
mov eax, 0x44fd98
test esi, esi
je 0x4016e7
mov edi, dword [esp + 0x24]
sub edi, eax
mov dl, byte [eax]
mov byte [edi + eax], dl
inc eax
dec esi
jne 0x4016d2
jmp 0x4016e7
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x24]
mov dword [edx], eax
mov ebx, dword [esp + 0x1c]
xor edi, edi
add ebx, 0x26
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], edi
cmp dword [esp + 0x20], edi
jle 0x4017d3
mov dl, bl
add dl, dl
mov eax, ebx
neg eax
mov byte [esp + 0x33], dl
mov dword [esp + 0x28], eax
jmp 0x401718
mov dl, byte [esp + 0x33]
mov eax, edi
sub eax, ecx
lea eax, [eax*4 + 4]
sub eax, ecx
add eax, ebx
je 0x401739
mov eax, ebx
sub eax, dword [esp + 0x18]
sub eax, ecx
add eax, dword [0x494924]
jmp 0x40174f
mov esi, dword [esp + 0x18]
mov eax, dword [0x494924]
add esi, 3
imul esi, edi
lea eax, [eax + eax*2]
add esi, ebx
add eax, esi
mov esi, dword [esp + 0x24]
sub dl, cl
add dl, al
mov eax, dword [0x494924]
add dl, al
xor byte [edi + esi], dl
cmp ebx, esi
jle 0x40176d
mov ecx, dword [esp + 0x10]
add dword [esp + 0x18], ecx
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
add dword [esp + 0x10], eax
cmp ebx, esi
jle 0x401780
inc dword [esp + 0x18]
mov ecx, dword [0x49491c]
cmp ebx, edi
jl 0x401795
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
jmp 0x401799
mov esi, dword [esp + 0x28]
mov eax, edi
sub eax, ecx
imul eax, dword [esp + 0x18]
cdq
idiv ebx
mov edx, dword [esp + 0x18]
sub esi, ecx
add esi, dword [0x494924]
add dword [esp + 0x28], 2
inc edi
lea eax, [eax + edx*2]
sub eax, ecx
add eax, dword [0x494924]
cdq
idiv esi
add dword [esp + 0x18], eax
cmp edi, dword [esp + 0x20]
jl 0x401714
mov edx, dword [esp + 0x24]
inc ecx
imul ecx, dword [0x494920]
lea eax, [esp + 0x3c]
mov dword [edx + 1], eax
test ecx, ecx
jne 0x4017f5
mov eax, dword [0x494910]
add dword [0x494914], eax
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.USER32.dll_OpenClipboard]
mov ebx, dword [esp + 0x38]
lea ecx, [ebx + 2]
push ecx
call dword [sym.imp.USER32.dll_GetClipboardData]
test eax, eax
je 0x40181f
mov edx, dword [0x494910]
add dword [esp + 0x98], edx
call dword [sym.imp.USER32.dll_CloseClipboard]
push esi
call dword [sym.imp.USER32.dll_GetDC]
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.GDI32.dll_CreateBitmapIndirect]
mov edi, eax
test edi, edi
jne 0x401847
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x40184b
mov esi, dword [esp + 0x28]
lea ecx, [esp + 0x1c0]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x4018a1
lea edx, [esp + 0x1c0]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4018a1
lea eax, [esp + 0x460]
lea esi, [esp + 0x1c0]
mov ecx, eax
mov edx, 0x104
sub esi, ecx
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x4018ac
movzx ecx, word [eax + esi]
test cx, cx
je 0x4018ac
add eax, 2
dec edx
jne 0x401886
jmp 0x4018ac
cmp dword [esp + 0x14], 0
je 0x4018ac
add dword [esp + 0x1c], esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x8c]
push eax
push esi
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [esp + 0x28]
cmp eax, ebx
je 0x4018d1
push edi
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
jmp 0x4018ef
mov edx, dword [0x494910]
add edx, dword [0x494914]
add edx, dword [esp + 0x40]
push edx
push ecx
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
cmp eax, dword [esp + 0x34]
jle 0x4018f5
mov dword [ebx], 0
mov edx, dword [0x494910]
add edx, dword [0x494914]
cmp edx, dword [0x494928]
jle 0x40190f
inc dword [0x494914]
lea ecx, [esp + 0xb8]
push ecx
push 0x18
push ebx
call dword [sym.imp.GDI32.dll_GetObjectA]
cmp eax, dword [esp + 0x34]
jge 0x401939
push 1
lea edx, [esp + 0x90]
push edx
push esi
call dword [sym.imp.USER32.dll_InvalidateRect]
jmp 0x401944
mov eax, dword [0x494928]
mov dword [eax], 0
push esi
call dword [sym.imp.USER32.dll_IsMenu]
test eax, eax
je 0x401966
push 0
push str.for_a_specified_device_context
lea ecx, [esp + 0xc0]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ebx, dword [esp + 0x98]
sub ebx, dword [esp + 0x90]
push 0
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x9c], 0xc
mov dword [esp + 0xa4], 1
mov dword [esp + 0xa0], 0
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x4019e0
lea edx, [esp + 0xb8]
push edx
call fcn.00402229
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6d8]
xor ecx, esp
call fcn.00401c6f
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [esp + 0x94]
mov edi, dword [esp + 0x28]
sub esi, dword [esp + 0x8c]
add edi, dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx eax, ax
push eax
call dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ecx, dword [esp + 0x14]
add dword [0x494914], eax
push 0
push 0
push 0x31
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x401a28
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
push 1
push edx
push 0x30
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_GetDlgCtrlID]
cmp eax, dword [esp + 0x38]
jne 0x401a61
mov edx, dword [0x494914]
mov eax, dword [esp + 0x14]
push edx
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
jmp 0x401a6a
add edi, ebx
mov dword [edi + esi], 0
mov edx, dword [0x494910]
push 4
lea ecx, [esp + 0x3cc]
push ecx
push 3
push edx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
cmp dword [esp + 0x34], 0
je 0x40134a
cmp dword [esp + 0x14], 0
je 0x401aa5
lea eax, [esp + 0x1c0]
push eax
call fcn.00402131
add esp, 4
mov eax, dword [esp + 0x24]
push eax
call eax
mov ecx, dword [esp + 0x6e4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401c6f
mov esp, ebp
pop ebp
ret 0x10