Function at 0x40d4d0
Capabilities:
Check if file exists
Copy file
Create directory
Create shortcut via ishelllink
Get common file path
Get file attributes
Get file size
Get keyboard layout
Persist via default file association registry key
Persist via lnk shortcut
Query environment variable
Read .ini file
Read file on windows
Set registry value
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d3836
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1598
call fcn.004ae220
mov eax, dword [0x508068]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0xc58]
push eax
push 0
push 0
push 0x801a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push 0x208
push 0x4eb6a0
lea eax, [ebp - 0xc58]
push 0x208
push eax
call fcn.004b68c3
add esp, 0x10
lea eax, [ebp - 0xc58]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 0xffffffff
jne 0x40d58c
push 0
lea eax, [ebp - 0xc58]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40d58c
cmp byte [0x5102e0], al
je 0x40d58c
push eax
push 0x4eb6b8
push 0x4eb6cc
push eax
call edi
push 8
xor eax, eax
mov dword [ebp - 0x1580], 0
push 0x4eb6f4
lea ecx, [ebp - 0x1590]
mov dword [ebp - 0x157c], 7
mov word [ebp - 0x1590], ax
call fcn.00407d10
lea ecx, [ebp - 0xc58]
mov dword [ebp - 4], 0
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d5d0
sub ecx, edx
lea eax, [ebp - 0xc58]
sar ecx, 1
push ecx
push eax
push ecx
lea ecx, [ebp - 0x1590]
call fcn.00453aa0
mov dword [ebp - 0x14e8], 0
xor ecx, ecx
mov dword [ebp - 0x14e4], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x14f8], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x14e8], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea ecx, [ebp - 0x1590]
mov byte [ebp - 4], 2
call fcn.00407cb0
cmp dword [ebp - 0x14e4], 8
lea eax, [ebp - 0x14f8]
push 0
cmovae eax, dword [ebp - 0x14f8]
push 0x80
push 1
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d982
cmp dword [ebp - 0x14e4], 8
lea eax, [ebp - 0x14f8]
push 0
cmovae eax, dword [ebp - 0x14f8]
push 0x80
push 3
push 0
push 1
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d6b6
call fcn.0040d3b0
jmp 0x40d9dc
lea eax, [ebp - 0x14b8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40d97b
cmp dword [ebp - 0x14b4], 0
jl 0x40d97b
jg 0x40d6e8
cmp dword [ebp - 0x14b8], 0x1e
jb 0x40d97b
push 0
lea eax, [ebp - 0x147c]
push eax
push 0xa
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ebp - 0x34]
mov eax, 0x65646f6e
cmp eax, dword [ecx]
jne 0x40d97b
mov eax, 0x3264695f
cmp eax, dword [ecx + 4]
jne 0x40d97b
mov eax, 0x3a30
cmp ax, word [ecx + 8]
jne 0x40d97b
push 0
push 0
push 0xa
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x147c]
push eax
push 0x14
push 0x51043c
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x20
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x147c]
push eax
push 5
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ebp - 0x34]
mov eax, 0x65646f6e
cmp eax, dword [ecx]
jne 0x40d97b
mov eax, 0x73
cmp al, byte [ecx + 4]
jne 0x40d97b
push 0
push 0
push 0x25
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x147c]
push eax
push 5
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov byte [ebp - 0x2f], 0
mov eax, 2
mov dword [ebp - 0x1564], 0
movsx ecx, ax
cmp byte [ebp + ecx - 0x34], 0x3a
je 0x40d7d9
inc eax
cmp ax, 5
jl 0x40d7c6
jmp 0x40d7f5
movzx edx, ax
mov dword [ebp - 0x1564], edx
cmp ecx, 0x1b
jae 0x40f040
mov byte [ebp + ecx - 0x34], 0
test ax, ax
jne 0x40d80e
cmp byte [0x5102e0], 0
je 0x40d80e
push 0
push 0x4eb71c
push 0x4eb72c
push 0
call edi
lea eax, [ebp - 0x34]
push eax
call fcn.004b5a4b
mov ecx, eax
add esp, 4
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x1560], eax
imul eax, eax, 0x1a
sub ecx, eax
je 0x40d852
cmp byte [0x5102e0], 0
je 0x40d852
push 0
lea eax, [ebp - 0x34]
push eax
push 0x4eb748
push 0
call edi
mov eax, dword [ebp - 0x1564]
push 0
movsx edi, ax
push 0
add edi, 0x26
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
mov byte [ebp - 0x1a], 0
xorps xmm0, xmm0
mov dword [ebp - 0x1510], eax
mov dword [ebp - 0x1524], 1
movlpd qword [ebp - 0x1518], xmm0
mov byte [ebp - 0x1520], al
mov byte [ebp - 0x153a], al
mov byte [ebp - 0x1525], al
mov dword [ebp - 0x1564], eax
cmp dword [ebp - 0x1560], eax
jle 0x40d975
mov dword [ebp - 0x1568], eax
push 0
lea eax, [ebp - 0x147c]
push eax
push 0x1a
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x24]
push dword [ebp - 0x14bc]
movups xmm0, xmmword [ebp - 0x34]
mov dword [ebp - 0x1548], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1540], eax
mov ax, word [ebp - 0x1c]
mov word [ebp - 0x153c], ax
lea eax, [ebp - 0x1558]
push eax
push ecx
lea eax, [ebp - 0x14c0]
mov ecx, 0x5102cc
push eax
movups xmmword [ebp - 0x1558], xmm0
call fcn.00454160
cmp byte [ebp - 0x14bc], 0
jne 0x40d938
cmp byte [0x5102e0], 0
je 0x40d938
push 0
push str.FileSettigs__
push 0x4eb778
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [ebp - 0x1568]
cmp eax, dword [ebp - 0x1560]
je 0x40d975
push 0
push 0
add edi, 0x1a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x1564]
inc eax
mov dword [ebp - 0x1564], eax
cwde
mov dword [ebp - 0x1568], eax
cmp eax, dword [ebp - 0x1560]
jl 0x40d8b5
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
call fcn.0040d3b0
jmp 0x40d9d5
call fcn.0040d3b0
movq xmm0, qword [0x4eb7a8]
mov ax, word [0x4eb7b0]
movq qword [ebp - 0x38], xmm0
xorps xmm0, xmm0
mov word [ebp - 0x30], ax
mov eax, dword [0x51044c]
movups xmmword [ebp - 0x2d], xmm0
push 0
movups xmm0, xmmword [0x51043c]
mov dword [ebp - 0x1d], 0
mov dword [ebp - 0x1e], eax
lea eax, [ebp - 0x14bc]
push eax
push 0x1e
lea eax, [ebp - 0x38]
push eax
push esi
movups xmmword [ebp - 0x2e], xmm0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xd
xor eax, eax
mov dword [ebp - 0x149c], 0
push str._settings.ini
lea ecx, [ebp - 0x14ac]
mov dword [ebp - 0x1498], 7
mov word [ebp - 0x14ac], ax
call fcn.00407d10
lea ecx, [ebp - 0xc58]
mov byte [ebp - 4], 3
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40da20
sub ecx, edx
lea eax, [ebp - 0xc58]
sar ecx, 1
push ecx
push eax
push ecx
lea ecx, [ebp - 0x14ac]
call fcn.00453aa0
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x14c8], xmm0
movups xmmword [ebp - 0x1494], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov ecx, 0x50c868
movq qword [ebp - 0x14b8], xmm0
movq qword [ebp - 0x1484], xmm0
call fcn.00407cb0
movups xmm0, xmmword [ebp - 0x14c8]
xor eax, eax
mov dword [ebp - 0x1484], 0
lea ecx, [ebp - 0x1494]
mov dword [ebp - 0x1480], 7
movups xmmword [0x50c868], xmm0
mov word [ebp - 0x1494], ax
movq xmm0, qword [ebp - 0x14b8]
movq qword [0x50c878], xmm0
call fcn.00407cb0
lea ecx, [ebp - 0x14ac]
mov byte [ebp - 4], 2
call fcn.00407cb0
cmp dword [0x50c87c], 8
mov eax, 0x50c868
push 0
cmovae eax, dword [0x50c868]
push 0x80
push 1
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
mov dword [ebp - 0x1564], eax
call fcn.004b59da
add esp, 4
push eax
call fcn.004b5e34
add esp, 4
call fcn.004b5e13
cdq
mov ecx, 0xd8ef
idiv ecx
push 0
add edx, 0x2710
movzx eax, dx
mov dword [ebp - 0x1568], eax
lea eax, [ebp - 0x1508]
push eax
push 0
push 0x30
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
test eax, eax
jne 0x40db6e
cmp byte [0x5102e0], al
je 0x40db6e
push eax
push str.SystemParametersInfo__
push 0x4eb7e8
push dword [0x50e598]
call edi
mov eax, dword [ebp - 0x1500]
mov edx, 0x460
mov ecx, dword [ebp - 0x14fc]
mov esi, 0x23f
sub eax, dword [ebp - 0x1508]
sub ecx, dword [ebp - 0x1504]
mov dword [ebp - 0x1560], edx
mov dword [ebp - 0x147c], esi
cmp eax, edx
jl 0x40dba4
cmp ecx, esi
jge 0x40dbb4
mov edx, eax
mov dword [ebp - 0x1560], eax
mov esi, ecx
mov dword [ebp - 0x147c], ecx
sub eax, edx
sub ecx, esi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x1574], eax
mov eax, ecx
cdq
sub eax, edx
imul ecx, esi, 0x17
sar eax, 1
mov dword [ebp - 0x1570], eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp dword [ebp - 0x1564], 0xffffffff
mov dword [ebp - 0x14bc], esi
jne 0x40e2b4
cmp dword [0x50c87c], 8
mov eax, 0x50c868
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmovae eax, dword [0x50c868]
push eax
mov eax, dword [ebp - 0x1560]
push eax
push 0x4eb830
push 0x4eb848
call edi
cmp dword [0x50c87c], 8
mov dword [0x5102ec], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
mov eax, dword [ebp - 0x147c]
push eax
push 0x4eb850
push 0x4eb868
call edi
cmp dword [0x50c87c], 8
mov dword [0x5102f0], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
mov eax, dword [ebp - 0x1574]
push eax
push 0x4eb870
push 0x4eb884
call edi
cmp dword [0x50c87c], 8
mov dword [0x5102e4], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
mov eax, dword [ebp - 0x1570]
push eax
push 0x4eb88c
push 0x4eb8a0
call edi
cmp dword [0x50c87c], 8
mov dword [0x5102e8], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push esi
push 0x4eb8a8
push 0x4eb8c4
call edi
cmp dword [0x50c87c], 8
mov dword [0x5102f4], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0
push 0x4eb8cc
push 0x4eb8d8
call edi
cmp dword [0x50c87c], 8
mov dword [0x5102f8], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4eb8e0
push 0x4eb8f8
call edi
cmp dword [0x50c87c], 8
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov dword [0x5102fc], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0x29
push 0x510300
push 0x4eb900
push 0x4eb904
push 0x4eb920
call esi
cmp dword [0x50c87c], 8
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0
push 0x4eb928
push 0x4eb934
call edi
cmp dword [0x50c87c], 8
mov dword [0x5103fc], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4eb944
push 0x4eb95c
call edi
cmp dword [0x50c87c], 8
mov dword [0x510400], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0
push 0x4eb96c
push 0x4eb994
call edi
cmp dword [0x50c87c], 8
mov dword [0x510404], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4eb9a4
push 0x4eb9cc
call edi
cmp dword [0x50c87c], 8
mov dword [0x510354], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4eb9e0
push 0x4eba04
call edi
cmp dword [0x50c87c], 8
mov dword [0x510358], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4eba18
push 0x4eba44
call edi
cmp dword [0x50c87c], 8
mov dword [0x51035c], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4eba58
push 0x4eba74
call edi
cmp dword [0x50c87c], 8
mov dword [0x510360], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0
push 0x4eba88
push 0x4ebaa8
call edi
cmp dword [0x50c87c], 8
mov dword [0x510364], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0x64
push 0x510452
push 0x4ebabc
push 0x4ebac0
push 0x4ebad8
call esi
mov eax, 0x50c868
cmp dword [0x50c87c], 8
mov ecx, dword [ebp - 0x1568]
cmovae eax, dword [0x50c868]
push eax
movzx eax, cx
push eax
push 0x4ebaec
push 0x4ebaf8
call edi
cmp dword [0x50c87c], 8
mov dword [0x510368], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0xc8
push 0x4ebb08
push 0x4ebb34
call edi
cmp dword [0x50c87c], 8
mov dword [0x51036c], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0x32
push 0x4ebb40
push 0x4ebb6c
call edi
cmp dword [0x50c87c], 8
mov dword [0x510370], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 4
push 0x4ebb78
push 0x4ebb8c
call edi
cmp dword [0x50c87c], 8
mov dword [0x510374], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0
push 0x4ebb98
push 0x4ebbb4
call edi
cmp dword [0x50c87c], 8
mov dword [0x510378], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0
push 0x4ebbc0
push 0x4ebbdc
call edi
cmp dword [0x50c87c], 8
mov dword [0x51037c], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4ebbe8
push 0x4ebbf0
call edi
test eax, eax
mov eax, 0x50c868
setne byte [0x510408]
cmp dword [0x50c87c], 8
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4ebc08
push 0x4ebc10
call edi
test eax, eax
mov eax, 0x50c868
setne byte [0x510409]
cmp dword [0x50c87c], 8
cmovae eax, dword [0x50c868]
push eax
push 5
push 0x4ebc28
push 0x4ebc3c
call edi
cmp dword [0x50c87c], 8
mov dword [0x510380], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0x104
lea eax, [ebp - 0x240]
push eax
push 0x4ebc48
push str.path_0
push 0x4ebc5c
call esi
lea ecx, [ebp - 0x240]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e063
sub ecx, edx
lea eax, [ebp - 0x240]
sar ecx, 1
push ecx
push eax
mov ecx, 0x510384
call fcn.00407d10
cmp dword [0x50c87c], 8
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0x104
lea eax, [ebp - 0x240]
push eax
push 0x4ebc70
push str.path_1
push 0x4ebc84
call esi
lea ecx, [ebp - 0x240]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e0c0
sub ecx, edx
lea eax, [ebp - 0x240]
sar ecx, 1
push ecx
push eax
mov ecx, 0x51039c
call fcn.00407d10
cmp dword [0x50c87c], 8
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0x104
lea eax, [ebp - 0x240]
push eax
push 0x4ebc98
push str.path_2
push 0x4ebcac
call esi
lea ecx, [ebp - 0x240]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e120
sub ecx, edx
lea eax, [ebp - 0x240]
sar ecx, 1
push ecx
push eax
mov ecx, 0x5103b4
call fcn.00407d10
cmp dword [0x50c87c], 8
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0x104
lea eax, [ebp - 0x240]
push eax
push 0x4ebcc0
push str.path_3
push 0x4ebcd4
call esi
lea ecx, [ebp - 0x240]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e180
sub ecx, edx
lea eax, [ebp - 0x240]
sar ecx, 1
push ecx
push eax
mov ecx, 0x5103cc
call fcn.00407d10
cmp dword [0x50c87c], 8
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0x104
lea eax, [ebp - 0x240]
push eax
push 0x4ebce8
push str.path_4
push 0x4ebcfc
call esi
lea ecx, [ebp - 0x240]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e1e0
sub ecx, edx
lea eax, [ebp - 0x240]
sar ecx, 1
push ecx
push eax
mov ecx, 0x5103e4
call fcn.00407d10
cmp dword [0x50c87c], 8
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0x1f
push 0x4ebd10
push 0x4ebd38
call edi
cmp dword [0x50c87c], 8
mov dword [0x51040c], eax
mov eax, 0x50c868
cmovae eax, dword [0x50c868]
push eax
push 0
push 0x4ebd4c
push 0x4ebd74
call edi
test eax, eax
mov eax, 0x50c868
setne byte [0x510410]
cmp dword [0x50c87c], 8
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4ebd88
push 0x4ebda8
call edi
test eax, eax
mov eax, 0x50c868
setne byte [0x510411]
cmp dword [0x50c87c], 8
cmovae eax, dword [0x50c868]
push eax
push 1
push 0x4ebdbc
push 0x4ebdec
call edi
mov esi, dword [ebp - 0x1564]
test eax, eax
setne byte [0x510412]
jmp 0x40e7bd
mov eax, dword [ebp - 0x1560]
mov dword [0x5102ec], eax
mov eax, dword [ebp - 0x147c]
mov dword [0x5102f0], eax
mov eax, dword [ebp - 0x1574]
mov dword [0x5102e4], eax
mov eax, dword [ebp - 0x1570]
mov dword [0x5102e8], eax
xor eax, eax
push eax
push eax
mov dword [0x5102f4], esi
mov dword [0x5102f8], 0
mov dword [0x5102fc], 1
mov word [0x510300], ax
mov dword [ebp - 0x156c], 1
call dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov esi, eax
lea ecx, [esi*4]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x155c], eax
test eax, eax
je 0x40e379
push eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov edx, dword [ebp - 0x155c]
xor ecx, ecx
test esi, esi
je 0x40e372
mov dword [ebp - 0x1578], 0x3ff
nop
mov ax, word [edx + ecx*4]
and ax, word [ebp - 0x1578]
cmp ax, 0x19
je 0x40e368
inc ecx
cmp ecx, esi
jb 0x40e350
jmp 0x40e372
mov dword [ebp - 0x156c], 0
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x156c]
lea ecx, [ebp - 0x14ac]
movaps xmm0, xmmword [0x4fd080]
mov dword [0x5103fc], eax
xor eax, eax
push 0x22
push 0x4ebe00
mov dword [0x510400], 1
mov dword [0x510404], 0
movups xmmword [0x510354], xmm0
mov dword [0x510364], 0
mov dword [ebp - 0x149c], 0
mov dword [ebp - 0x1498], 7
mov word [ebp - 0x14ac], ax
call fcn.00407d10
mov byte [ebp - 4], 4
lea eax, [ebp - 0x14ac]
cmp dword [ebp - 0x1498], 8
cmovae eax, dword [ebp - 0x14ac]
push eax
push 0x64
push 0x510452
call fcn.004b68ce
mov eax, dword [ebp - 0x1568]
add esp, 0xc
movzx eax, ax
mov dword [0x510368], eax
lea eax, [ebp - 0x448]
mov dword [0x51036c], 0xc8
push 0x104
push eax
push 0x4ebe48
mov dword [0x510370], 0x32
mov dword [0x510374], 4
mov dword [0x510378], 0
mov dword [0x51037c], 0
mov word [0x510408], 0x101
mov dword [0x510380], 5
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x104
push 0x4ebe60
lea eax, [ebp - 0x448]
push 0x104
push eax
call fcn.004b68c3
add esp, 0x10
lea eax, [ebp - 0x448]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40e4ca
push 0
lea eax, [ebp - 0x448]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40e4ca
cmp byte [0x5102e0], al
je 0x40e4ca
push eax
push str.files_settings__
push 0x4ebe8c
push eax
call edi
xor eax, eax
mov dword [ebp - 0x1484], 0
lea ecx, [ebp - 0x448]
mov dword [ebp - 0x1480], 7
mov word [ebp - 0x1494], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e4f0
sub ecx, edx
lea eax, [ebp - 0x448]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x1494]
call fcn.00407d10
push 0x4ebeac
lea edx, [ebp - 0x1494]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x15a8]
call fcn.00408bc0
mov esi, eax
add esp, 4
cmp esi, 0x510384
je 0x40e56d
mov ecx, 0x510384
call fcn.00407cb0
movups xmm0, xmmword [esi]
xor eax, eax
movups xmmword [0x510384], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [0x510394], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea ecx, [ebp - 0x15a8]
call fcn.00407cb0
push 0
push 0x4ebeb0
mov ecx, 0x51039c
call fcn.00407d10
push 0
push 0x4ebeb4
mov ecx, 0x5103b4
call fcn.00407d10
push 0
push 0x4ebeb8
mov ecx, 0x5103cc
call fcn.00407d10
push 0
push 0x4ebebc
mov ecx, 0x5103e4
call fcn.00407d10
push 0xb0
lea eax, [ebp - 0xe8]
mov dword [0x51040c], 0x1f
push 0
push eax
mov word [0x510410], 0x100
mov byte [0x510412], 1
call fcn.004af970
add esp, 4
lea ecx, [ebp - 0xe8]
call fcn.00446c60
push dword [ebp - 0x156c]
mov byte [ebp - 4], 6
mov edx, str._gui__nhwnd_width
push dword [ebp - 0x14bc]
push dword [ebp - 0x1570]
push dword [ebp - 0x1574]
push dword [ebp - 0x147c]
push dword [ebp - 0x1560]
push ecx
lea ecx, [ebp - 0xd8]
call fcn.004508e0
add esp, 4
mov ecx, eax
call fcn.00447460
push ecx
mov edx, str._nhwnd_height
mov ecx, eax
call fcn.004508e0
add esp, 4
mov ecx, eax
call fcn.00447460
push ecx
mov edx, str._nhwnd_left
mov ecx, eax
call fcn.004508e0
add esp, 4
mov ecx, eax
call fcn.00447460
push ecx
mov edx, str._nhwnd_top
mov ecx, eax
call fcn.004508e0
add esp, 4
mov ecx, eax
call fcn.00447460
push ecx
mov edx, str._nsplitter_top
mov ecx, eax
call fcn.004508e0
add esp, 4
mov ecx, eax
call fcn.00447460
push ecx
mov edx, str._nadder0_ntab_control1_ntorrent_focus_n_n_general__nlang
mov ecx, eax
call fcn.004508e0
add esp, 4
mov ecx, eax
call fcn.00447460
mov edx, str._nsleep_idle1_nauto_start_program0_n_n_interface__nauto_start_torrent1_nshow_save_dialog1_nconfirm_del_torrents1_nclose_to_tray1_nall_list_peers0_nurl_search
mov ecx, eax
call fcn.004508e0
cmp dword [ebp - 0x1498], 8
lea edx, [ebp - 0x14ac]
push dword [ebp - 0x149c]
cmovae edx, dword [ebp - 0x14ac]
mov ecx, eax
call fcn.00454370
mov ecx, dword [ebp - 0x1568]
add esp, 4
mov edx, str._n_n_connect__nport
push ecx
push ecx
mov ecx, eax
call fcn.004508e0
add esp, 4
mov ecx, eax
call fcn.004475f0
mov edx, str._n_n_speed__nmax_peers_all_torrent200_nmax_peers_one_torrent50_nmax_slots4_nmax_in_speed0_nmax_out_speed0_n_n_BitTorrent__nDHT1_nPEX1_n_n_queue__nmax_queue5_n_n_path_save__npath_0
mov ecx, eax
call fcn.004508e0
cmp dword [ebp - 0x1480], 8
lea edx, [ebp - 0x1494]
push dword [ebp - 0x1484]
cmovae edx, dword [ebp - 0x1494]
mov ecx, eax
call fcn.00454370
add esp, 4
mov edx, str._npath_1_npath_3_npath_2_npath_4_n_n_advanced__ntransp_disposition31_nsequential_download0_ndelete_to_trash1_nleft_rail_offer_enabled1_n
mov ecx, eax
call fcn.004508e0
sub esp, 0xc
lea ecx, [ebp - 0xe8]
call fcn.00406fa0
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0xe8]
call fcn.00406ed0
lea ecx, [ebp - 0xe8]
mov esi, dword [eax + 8]
add esi, dword [eax]
lea eax, [ebp - 0x15a8]
push eax
add esi, esi
call fcn.00446ba0
cmp dword [eax + 0x14], 8
jb 0x40e775
mov eax, dword [eax]
push 0
lea ecx, [ebp - 0x14b4]
push ecx
push esi
mov esi, dword [ebp - 0x1564]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x15a8]
call fcn.00407cb0
lea ecx, [ebp - 0xe8]
call fcn.0040f050
lea ecx, [ebp - 0x1494]
call fcn.00407cb0
lea ecx, [ebp - 0x14ac]
mov byte [ebp - 4], 2
call fcn.00407cb0
mov ecx, dword [0x5102f0]
mov eax, ecx
and eax, reloc.WS2_32.dll_accept
jns 0x40e7d3
dec eax
or eax, 0xfffffffe
add eax, 1
jne 0x40e7dc
dec ecx
mov dword [0x5102f0], ecx
mov eax, dword [0x5102fc]
push esi
mov dword [0x50fbbc], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xe
xor eax, eax
mov dword [ebp - 0x149c], 0
push 0x4ec128
lea ecx, [ebp - 0x14ac]
mov dword [ebp - 0x1498], 7
mov word [ebp - 0x14ac], ax
call fcn.00407d10
lea ecx, [ebp - 0xc58]
mov byte [ebp - 4], 7
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e830
sub ecx, edx
lea eax, [ebp - 0xc58]
sar ecx, 1
push ecx
push eax
push ecx
lea ecx, [ebp - 0x14ac]
call fcn.00453aa0
mov dword [ebp - 0x14d0], 0
xor ecx, ecx
mov dword [ebp - 0x14cc], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x14e0], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x14d0], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea ecx, [ebp - 0x14ac]
mov byte [ebp - 4], 9
call fcn.00407cb0
cmp dword [ebp - 0x14cc], 8
lea eax, [ebp - 0x14e0]
cmovae eax, dword [ebp - 0x14e0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40f00c
push 0x104
lea eax, [ebp - 0x1270]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp dword [ebp - 0x14cc], 8
lea eax, [ebp - 0x14e0]
push 1
cmovae eax, dword [ebp - 0x14e0]
push eax
lea eax, [ebp - 0x1270]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jne 0x40eaeb
lea eax, [ebp - 0x1560]
push eax
push 0x4da670
push 1
push 0
push 0x4da690
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40eadd
xor eax, eax
mov word [ebp - 0xe60], ax
lea eax, [ebp - 0x14bc]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40e973
lea eax, [ebp - 0xe60]
push eax
push dword [ebp - 0x14bc]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov eax, dword [ebp - 0x1560]
lea edx, [ebp - 0xe60]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [ebp - 0x1560]
lea edx, [ebp - 0x14e0]
cmp dword [ebp - 0x14cc], 8
cmovae edx, dword [ebp - 0x14e0]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x50]
mov eax, dword [ebp - 0x1560]
lea edx, [ebp - 0x1564]
push edx
push 0x4da680
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x40eac3
push 0x4ec148
lea ecx, [ebp - 0x15a8]
call fcn.004068a0
push eax
lea edx, [ebp - 0xe60]
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x1494]
call fcn.00450830
add esp, 4
lea ecx, [ebp - 0x15a8]
mov byte [ebp - 4], 0xc
call fcn.00407cb0
mov eax, dword [ebp - 0x1564]
lea edx, [ebp - 0x1494]
cmp dword [ebp - 0x1480], 8
push 1
cmovae edx, dword [ebp - 0x1494]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x18]
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x1478]
push eax
push 0
push 0
push 0x8002
push 0
call esi
push str._byTorrent.lnk
lea ecx, [ebp - 0x34]
call fcn.004068a0
push eax
lea edx, [ebp - 0x1478]
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x1590]
call fcn.00450830
add esp, 4
lea ecx, [ebp - 0x1494]
push eax
call fcn.00406820
lea ecx, [ebp - 0x1590]
call fcn.00407cb0
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0xc
call fcn.00407cb0
mov eax, dword [ebp - 0x1564]
lea edx, [ebp - 0x1494]
cmp dword [ebp - 0x1480], 8
push 1
cmovae edx, dword [ebp - 0x1494]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x18]
mov eax, dword [ebp - 0x1564]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
lea ecx, [ebp - 0x1494]
mov byte [ebp - 4], 9
call fcn.00407cb0
mov eax, dword [ebp - 0x1560]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x40eaf1
mov eax, dword [ebp - 0x1560]
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x40eaf1
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
call dword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x40eaf1
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x1068]
push eax
push 0
push 0
push 0x801a
push 0
call esi
push 0x104
push 0x4ec188
lea eax, [ebp - 0x1068]
push 0x104
push eax
call fcn.004b68c3
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea eax, [ebp - 0x155c]
add esp, 0x10
push 0
push eax
push 0
push 0x20006
push 0
push 0
push 0
push 0x4ec1c0
push bind
call edi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0
push 0x4ec1bc
push 1
push 0
push 0
push dword [ebp - 0x155c]
call esi
push dword [ebp - 0x155c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
lea eax, [ebp - 0x155c]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push str.byTorrent_shell
push bind
call edi
push 8
push 0x4ec1d4
push 1
push 0
push 0
push dword [ebp - 0x155c]
call esi
push dword [ebp - 0x155c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
lea eax, [ebp - 0x155c]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push str.byTorrent_shellopen
push bind
call edi
push 0
push 0x4ec200
push 1
push 0
push 0
push dword [ebp - 0x155c]
call esi
push dword [ebp - 0x155c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x1068]
push eax
push str.__s_____1___SHELLASSOC
lea eax, [ebp - 0x448]
push eax
call fcn.00450c40
add esp, 0xc
lea eax, [ebp - 0x155c]
push 0
push eax
push 0
push 0x20006
push 0
push 0
push 0
push str.byTorrent_shellOpencommand
push bind
call edi
lea ecx, [ebp - 0x448]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ec40
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x448]
push eax
push 1
push 0
push 0
push dword [ebp - 0x155c]
call esi
push dword [ebp - 0x155c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
lea eax, [ebp - 0x147c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREClasses.torrent
push reloc.WS2_32.dll_accept
call edi
test eax, eax
jne 0x40ed79
push 0x4ec2d0
lea eax, [ebp - 0x848]
push 0x200
push eax
call fcn.004b68ce
add esp, 0xc
lea eax, [ebp - 0x848]
push 0x4ec304
push 0x200
push eax
call fcn.004b68ce
lea ecx, [ebp - 0x848]
add esp, 0xc
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ece0
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x848]
push eax
push 1
push 0
push 0
push dword [ebp - 0x147c]
call esi
push 0x4ec318
lea eax, [ebp - 0x100]
push 0x64
push eax
call fcn.004b68ce
add esp, 0xc
lea eax, [ebp - 0x848]
push str.application_x_bittorrent
push 0x200
push eax
call fcn.004b68ce
lea ecx, [ebp - 0x848]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ed40
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x848]
push eax
push 1
push 0
lea eax, [ebp - 0x100]
push eax
push dword [ebp - 0x147c]
call esi
push dword [ebp - 0x147c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
lea eax, [ebp - 0x147c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREClasses.torrentOpenWithProgids
push reloc.WS2_32.dll_accept
call edi
test eax, eax
jne 0x40edd8
push 0x4ec3bc
lea eax, [ebp - 0x100]
push 0x64
push eax
call fcn.004b68ce
add esp, 0xc
lea eax, [ebp - 0x100]
push 0
push 0
push 1
push 0
push eax
push dword [ebp - 0x147c]
call esi
push dword [ebp - 0x147c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
lea eax, [ebp - 0x147c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREClassesMagnet
push reloc.WS2_32.dll_accept
call edi
test eax, eax
jne 0x40eeea
push str.Magnet_URI
lea eax, [ebp - 0x848]
push 0x200
push eax
call fcn.004b68ce
lea ecx, [ebp - 0x848]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ee24
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x848]
push eax
push 1
push 0
push 0
push dword [ebp - 0x147c]
call esi
push str.Content_Type
lea eax, [ebp - 0x100]
push 0x64
push eax
call fcn.004b68ce
add esp, 0xc
lea eax, [ebp - 0x848]
push str.application_x_magnet
push 0x200
push eax
call fcn.004b68ce
lea ecx, [ebp - 0x848]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ee84
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x848]
push eax
push 1
push 0
lea eax, [ebp - 0x100]
push eax
push dword [ebp - 0x147c]
call esi
push str.URL_Protocol
lea eax, [ebp - 0x100]
push 0x64
push eax
call fcn.004b68ce
add esp, 0xc
lea eax, [ebp - 0x100]
push 0
push 0
push 1
push 0
push eax
push dword [ebp - 0x147c]
call esi
push dword [ebp - 0x147c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
lea eax, [ebp - 0x147c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREClassesMagnet_shell
push reloc.WS2_32.dll_accept
call edi
test eax, eax
jne 0x40ef66
push 0x4ec4b8
lea eax, [ebp - 0x848]
push 0x200
push eax
call fcn.004b68ce
lea ecx, [ebp - 0x848]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ef32
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x848]
push eax
push 1
push 0
push 0
push dword [ebp - 0x147c]
call esi
push dword [ebp - 0x147c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
lea eax, [ebp - 0x147c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREClassesMagnet_shellopen
push reloc.WS2_32.dll_accept
call edi
test eax, eax
jne 0x40ef98
push dword [ebp - 0x147c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
lea eax, [ebp - 0x147c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREClassesMagnet_shellopencommand
push reloc.WS2_32.dll_accept
call edi
test eax, eax
jne 0x40effb
lea ecx, [ebp - 0x448]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40efc7
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x448]
push eax
push 1
push 0
push 0
push dword [ebp - 0x147c]
call esi
push dword [ebp - 0x147c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push 0
push 0x8000000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
lea ecx, [ebp - 0x14e0]
call fcn.00407cb0
lea ecx, [ebp - 0x14f8]
call fcn.00407cb0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004ad19c
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004ad2d3
int3