Function at 0x401351
Capabilities:
Copy file
Create shortcut via ishelllink
Delete file
Delete registry value
Enumerate files on windows
Get file attributes
Move file
Query environment variable
Query or enumerate registry key
Query or enumerate registry value
Read file on windows
Set current directory
Set file attributes
Set registry value

Disassembly:
sub esp, 0x2d0
mov eax, dword [0x4701f8]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2e0]
push edi
push 7
mov dword [esp + 0x20], eax
lea edi, [esp + 0x2c]
xor eax, eax
pop ecx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x2c]
mov ebx, eax
mov edi, dword [esp + 0x30]
mov ebp, ecx
mov edx, dword [esp + 0x28]
mov eax, section..gdata
mov esi, edi
shl ebp, 0xe
add ebp, eax
shl esi, 0xe
add esi, eax
mov dword [esp + 0x10], ebx
lea eax, [esp + 0x2c]
mov dword [esp + 0x24], ecx
mov dword [0x409104], eax
lea eax, [edx - 2]
cmp eax, 0x41
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x1c]
ja case.0x4013bf.20
lea ebx, [edx - 2]
jmp dword [ebx*4 + 0x402add]
mov eax, ecx
jmp 0x402acf
xor eax, eax
push eax
push ecx
call fcn.00404d73
mov eax, 0x7fffffff
jmp 0x402acf
inc dword [0x4701ec]
test eax, eax
je 0x4013d6
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x4013d6
push ecx
call fcn.00402d18
dec eax
push 0
push eax
call fcn.004011a0
jmp 0x402acf
xor eax, eax
push eax
push ecx
call fcn.00404d73
jmp case.0x4013bf.20
xor eax, eax
push eax
call fcn.00402c1d
xor edi, edi
inc edi
cmp eax, edi
pop ecx
cmovg edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp case.0x4013bf.20
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp case.0x4013bf.20
cmp dword [esp + 0x34], 0
jne 0x40146f
mov eax, dword [ecx*4 + 0x4782c0]
push 1
mov dword [ecx*4 + 0x478280], eax
call fcn.00402c1d
pop ecx
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov dword [eax*4 + 0x4782c0], ecx
jmp case.0x4013bf.20
mov eax, dword [ecx*4 + 0x478280]
mov dword [ecx*4 + 0x4782c0], eax
jmp case.0x4013bf.20
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
push 4
mov edx, dword [ecx*4 + 0x4782c0]
and eax, edx
mov dword [ecx*4 + 0x4782c0], eax
xor eax, eax
test edx, edx
pop ecx
cmove eax, ecx
mov eax, dword [esp + eax + 0x2c]
jmp 0x402acf
push dword [edi*4 + 0x4782c0]
push ebp
call fcn.004054c9
jmp case.0x4013bf.20
mov eax, dword [0x4701e4]
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
test eax, eax
je 0x4014d6
push edi
push eax
call esi
mov ecx, dword [esp + 0x2c]
mov eax, dword [0x4701e8]
test eax, eax
je case.0x4013bf.20
push ecx
push eax
call esi
jmp case.0x4013bf.20
push 0xfffffffffffffff0
call fcn.00402c59
push dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne case.0x4013bf.20
xor ebx, ebx
inc ebx
jmp 0x402ac7
push 0xfffffffffffffff0
call fcn.00402c59
mov edi, eax
push edi
call fcn.004059df
mov ebx, dword [esp + 0x10]
mov esi, eax
test esi, esi
je 0x401581
push 0x5c
push esi
call fcn.004054a0
mov esi, eax
xor eax, eax
movzx ebp, word [esi]
mov word [esi], ax
test bp, bp
jne 0x401555
cmp dword [esp + 0x34], eax
je 0x401555
call fcn.004053a6
test eax, eax
je 0x401555
push edi
call fcn.00404e77
jmp 0x40155b
push edi
call fcn.00404e57
test eax, eax
je 0x401572
cmp eax, 0xb7
jne 0x401571
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x401572
inc ebx
mov word [esi], bp
add esi, 2
test bp, bp
jne 0x401527
mov dword [esp + 0x10], ebx
cmp dword [esp + 0x30], 0
push 0x40d108
je 0x4015b8
push 0xffffffffffffffe6
call fcn.00404d73
push edi
push 0x4d1000
call fcn.0040599b
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne case.0x4013bf.20
inc ebx
mov dword [esp + 0x10], ebx
jmp case.0x4013bf.20
push 0xfffffffffffffff5
jmp 0x40140d
xor eax, eax
push eax
call fcn.00402c59
push eax
call fcn.00405479
jmp 0x401c62
push 0xffffffffffffffd0
call fcn.00402c59
push 0xffffffffffffffdf
mov edi, eax
call fcn.00402c59
push 0x13
mov esi, eax
call fcn.00402c59
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x401506
push 0x40d108
push 0xffffffffffffffe3
jmp 0x40140d
xor ebx, ebx
push ebx
call fcn.00402c59
mov edi, eax
mov ebp, 0x2000
lea eax, [esp + 0x18]
push eax
push esi
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x401632
xor ebx, ebx
inc ebx
xor eax, eax
mov word [esi], ax
jmp 0x40165a
mov eax, dword [esp + 0x18]
cmp eax, edi
jbe 0x401656
cmp word [eax], bx
je 0x401656
push edi
call fcn.00405479
test eax, eax
je 0x401628
add eax, 0x2c
push eax
push dword [esp + 0x1c]
call fcn.0040599b
mov ebx, dword [esp + 0x10]
cmp dword [esp + 0x34], 0
jne 0x402ac7
push ebp
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
jmp 0x402ac7
push 0xffffffffffffffff
call fcn.00402c59
lea ecx, [esp + 0x54]
push ecx
push ebp
push 0x2000
xor ecx, ecx
push ecx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
jne case.0x4013bf.20
xor ebx, ebx
inc ebx
xor eax, eax
mov word [ebp], ax
jmp 0x402ac7
push 0xffffffffffffffef
call fcn.00402c59
push eax
push ebp
call fcn.004058d7
jmp 0x4014fe
push 0x31
call fcn.00402c59
mov esi, dword [esp + 0x2c]
mov ebp, eax
push ebp
and esi, 7
call fcn.00405c1d
mov ebx, 0x409108
push ebp
test eax, eax
je 0x4016e1
push ebx
call fcn.0040599b
jmp 0x4016f8
push 0x4d1000
push ebx
call fcn.0040599b
push eax
call fcn.00405400
push eax
call sub.KERNEL32.dll_lstrcatW
push ebx
call fcn.00405b57
xor edi, edi
inc edi
cmp esi, 3
jl 0x401733
push ebx
call fcn.00405479
xor ecx, ecx
test eax, eax
je 0x401723
lea ecx, [esp + 0x38]
add eax, 0x14
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
mov ecx, eax
add esi, 0xfffffffd
or esi, 0x80000000
and esi, ecx
neg esi
sbb esi, esi
inc esi
test esi, esi
jne 0x40173d
push ebx
call fcn.004059b7
xor eax, eax
cmp esi, edi
setne al
inc eax
push eax
push 0x40000000
push ebx
call fcn.0040579c
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x4017e1
test esi, esi
jne 0x4017cc
push section..gdata
push 0x411108
call fcn.0040599b
push ebx
push section..gdata
call fcn.0040599b
push dword [esp + 0x40]
push 0x40d108
call fcn.00404ef3
push 0x411108
push section..gdata
call fcn.0040599b
mov eax, dword [esp + 0x2c]
sar eax, 3
push eax
push 0x40d108
call fcn.00405929
sub eax, 4
je 0x401701
sub eax, 1
je 0x4017c1
push ebx
push 0xfffffffffffffffa
jmp 0x4013d1
inc dword [0x4782c8]
jmp 0x402acd
push ebp
push 0xffffffffffffffe2
call fcn.00404d73
xor ebx, ebx
cmp esi, 2
sete bl
jmp 0x402ac7
push ebp
push 0xffffffffffffffea
call fcn.00404d73
mov esi, dword [esp + 0x14]
xor eax, eax
inc dword [0x4782f4]
push eax
push eax
push esi
push dword [esp + 0x40]
call fcn.00402ee2
dec dword [0x4782f4]
mov edi, eax
cmp dword [esp + 0x38], 0xffffffff
jne 0x401817
cmp dword [esp + 0x3c], 0xffffffff
je 0x40182b
lea eax, [esp + 0x38]
push eax
xor eax, eax
push eax
lea eax, [esp + 0x40]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jns case.0x4013bf.20
cmp edi, 0xfffffffe
jne 0x401850
push 0xffffffffffffffe9
push ebx
call fcn.00404ef3
push ebp
push ebx
call sub.KERNEL32.dll_lstrcatW
jmp 0x401858
push 0xffffffffffffffee
push ebx
call fcn.00404ef3
push 0x200010
push ebx
call fcn.00405929
jmp 0x4013d6
xor eax, eax
push eax
call fcn.00402c59
push dword [esp + 0x30]
push eax
call fcn.004055c3
jmp case.0x4013bf.20
push 0x31
call fcn.00402c59
push dword [esp + 0x2c]
push eax
call fcn.00405929
test eax, eax
je 0x401506
cmp eax, dword [esp + 0x34]
je 0x4019f9
cmp eax, dword [esp + 0x3c]
jne case.0x4013bf.20
mov eax, dword [esp + 0x40]
jmp 0x402acf
push 0xfffffffffffffff0
jmp 0x40186b
push 1
call fcn.00402c59
push eax
call sub.KERNEL32.dll_lstrlenW
push eax
jmp 0x4014b4
push 2
call fcn.00402c1d
push 3
mov edi, eax
mov esi, edx
call fcn.00402c1d
pop ecx
pop ecx
push 1
mov ebx, eax
call fcn.00402c59
push eax
mov dword [esp + 0x18], eax
call sub.KERNEL32.dll_lstrlenW
xor ecx, ecx
test esi, esi
mov word [ebp], cx
cmove edi, eax
test edi, edi
je case.0x4013bf.20
test ebx, ebx
jns 0x401912
add ebx, eax
js case.0x4013bf.20
cmp ebx, eax
cmovg ebx, eax
mov eax, dword [esp + 0x14]
lea eax, [eax + ebx*2]
push eax
push ebp
call fcn.0040599b
test edi, edi
jns 0x401931
push ebp
call sub.KERNEL32.dll_lstrlenW
add edi, eax
mov ebx, dword [esp + 0x10]
xor eax, eax
test edi, edi
cmovns eax, edi
cmp eax, 0x2000
jge 0x402ac7
xor ecx, ecx
mov word [ebp + eax*2], cx
jmp 0x402ac7
push 0x20
call fcn.00402c59
push 0x31
mov esi, eax
call fcn.00402c59
cmp dword [esp + 0x3c], 0
push eax
push esi
jne 0x401974
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
jmp 0x40197a
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x4019f9
mov eax, dword [esp + 0x34]
jmp 0x402acf
xor edi, edi
inc edi
push edi
call fcn.00402c59
push 0x2000
mov esi, eax
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4019b6
cmp dword [esp + 0x34], 0
je 0x4019c0
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x4019c0
xor eax, eax
mov ebx, edi
mov word [ebp], ax
jmp 0x4019c4
mov ebx, dword [esp + 0x10]
xor eax, eax
mov word [ebp + 0x3ffe], ax
jmp 0x402ac7
mov esi, dword [esp + 0x40]
xor eax, eax
push eax
call fcn.00402c1d
push 1
mov edi, eax
call fcn.00402c1d
pop ecx
pop ecx
test esi, esi
jne 0x4019f5
cmp edi, eax
jl 0x4019f9
jle 0x40197e
jmp 0x401a08
cmp edi, eax
jae 0x401a02
mov eax, dword [esp + 0x38]
jmp 0x402acf
jbe 0x40197e
mov eax, dword [esp + 0x3c]
jmp 0x402acf
xor edi, edi
inc edi
push edi
call fcn.00402c1d
push 2
mov esi, eax
call fcn.00402c1d
pop ecx
pop ecx
mov ecx, eax
mov eax, dword [esp + 0x38]
cmp eax, 0xd
ja case.default.0x401a30
jmp dword [eax*4 + 0x402be5]
add esi, ecx
jmp case.default.0x401a30
sub esi, ecx
jmp case.default.0x401a30
imul esi, ecx
jmp case.default.0x401a30
test ecx, ecx
je 0x401a4f
mov eax, esi
cdq
idiv ecx
jmp 0x401a51
xor eax, eax
mov esi, eax
xor ebx, ebx
test ecx, ecx
sete bl
jmp 0x401aa4
or esi, ecx
jmp case.default.0x401a30
and esi, ecx
jmp case.default.0x401a30
xor esi, ecx
jmp case.default.0x401a30
xor eax, eax
test esi, esi
sete al
mov esi, eax
jmp case.default.0x401a30
test esi, esi
je 0x401a83
mov esi, edi
jmp case.default.0x401a30
xor eax, eax
jmp 0x401a6f
test esi, esi
je 0x401a7b
test ecx, ecx
je 0x401a7b
jmp 0x401a77
test ecx, ecx
je 0x401a4f
mov eax, esi
cdq
idiv ecx
mov esi, edx
jmp 0x401a53
shl esi, cl
jmp case.default.0x401a30
sar esi, cl
jmp case.default.0x401a30
shr esi, cl
mov ebx, dword [esp + 0x10]
push esi
push ebp
call fcn.004054c9
jmp 0x402ac7
push 1
call fcn.00402c59
push 2
mov esi, eax
call fcn.00402c1d
push eax
push esi
push ebp
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
jmp case.0x4013bf.20
mov eax, dword [esp + 0x34]
mov esi, dword [0x409100]
test eax, eax
je 0x401b35
dec eax
test esi, esi
je 0x401b20
mov esi, dword [esi]
test eax, eax
jne 0x401adf
test esi, esi
je 0x401b20
add esi, 4
mov ebx, 0x409108
push esi
push ebx
call fcn.0040599b
mov eax, dword [0x409100]
add eax, 4
push eax
push esi
call fcn.0040599b
mov eax, dword [0x409100]
push ebx
add eax, 4
push eax
call fcn.0040599b
jmp case.0x4013bf.20
push 0x200010
push 0xffffffffffffffe8
xor eax, eax
push eax
call fcn.00404ef3
push eax
jmp 0x40185e
test edi, edi
je 0x401b5e
test esi, esi
je 0x401506
lea eax, [esi + 4]
push eax
push ebp
call fcn.0040599b
mov eax, dword [esi]
push esi
mov dword [0x409100], eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp case.0x4013bf.20
push 0x4004
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push dword [esp + 0x2c]
mov esi, eax
lea eax, [esi + 4]
push eax
call fcn.00404ef3
mov eax, dword [0x409100]
mov dword [esi], eax
mov dword [0x409100], esi
jmp case.0x4013bf.20
push 3
call fcn.00402c1d
push 4
mov ebx, eax
call fcn.00402c1d
mov edi, eax
mov eax, dword [esp + 0x48]
pop ecx
pop ecx
test al, 1
je 0x401bb5
push 0x33
call fcn.00402c59
mov ebx, eax
mov eax, dword [esp + 0x40]
test al, 2
je 0x401bc2
push 0x44
call fcn.00402c59
mov edi, eax
cmp dword [esp + 0x28], 0x23
push 1
jne 0x401c14
call fcn.00402c1d
push 2
mov esi, eax
call fcn.00402c1d
pop ecx
pop ecx
mov ecx, dword [esp + 0x40]
sar ecx, 2
test ecx, ecx
je 0x401c08
lea edx, [esp + 0x20]
push edx
push ecx
xor ecx, ecx
push ecx
push edi
push ebx
push eax
push esi
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
neg eax
sbb ebx, ebx
mov eax, dword [esp + 0x20]
inc ebx
mov dword [esp + 0x10], ebx
jmp 0x401c42
push edi
push ebx
push eax
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x401c3e
call fcn.00402c59
push 0x12
mov esi, eax
call fcn.00402c59
xor ecx, ecx
xor edx, edx
cmp word [eax], dx
cmovne ecx, eax
push ecx
xor ecx, ecx
cmp word [esi], dx
cmovne ecx, esi
push ecx
push edi
push ebx
call dword [sym.imp.USER32.dll_FindWindowExW]
mov dword [esp + 0x20], eax
cmp dword [esp + 0x2c], 0
jl case.0x4013bf.20
jmp 0x4018c6
xor eax, eax
push eax
call fcn.00402c1d
pop ecx
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40197e
mov eax, dword [esp + 0x30]
jmp 0x402acf
push 2
call fcn.00402c1d
push 1
mov esi, eax
call fcn.00402c1d
pop ecx
pop ecx
push esi
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
jmp 0x4018c6
mov esi, dword [0x478248]
xor eax, eax
push eax
add esi, edi
call fcn.00402c1d
pop ecx
push esi
push 0xffffffffffffffeb
push eax
call dword [sym.imp.USER32.dll_SetWindowLongW]
jmp case.0x4013bf.20
test dword [esp + 0x38], 0x100
je 0x401cc6
push 2
call fcn.00402c1d
pop ecx
jmp 0x401cd1
push dword [esp + 0x34]
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ebx, eax
mov eax, dword [esp + 0x38]
mov ecx, eax
mov edi, eax
and ecx, 4
shr edi, 0x1e
mov dword [esp + 0x44], ecx
mov esi, eax
mov ecx, eax
and esi, 3
shr ecx, 0x1f
and edi, 1
mov dword [esp + 0x14], ecx
test eax, 0x10000
je 0x401d06
push 0x11
call fcn.00402c59
jmp 0x401d0b
movzx eax, word [esp + 0x30]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x54]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x38]
and eax, 0xfef0
push eax
mov eax, dword [esp + 0x64]
imul eax, edi
push eax
mov eax, dword [esp + 0x64]
imul eax, dword [esp + 0x1c]
push eax
xor eax, eax
cmp dword [esp + 0x50], eax
push esi
push dword [esp + 0x28]
cmovne eax, dword [0x4701f4]
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
mov edi, eax
push edi
push esi
push 0x172
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x401d6f
test esi, esi
jne 0x401d6f
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [esp + 0x2c], 0
jl case.0x4013bf.20
push edi
jmp 0x4014b4
push eax
call dword [sym.imp.USER32.dll_GetDC]
push 2
mov edi, eax
call fcn.00402c1d
pop ecx
push 0x48
push 0x5a
push edi
mov esi, eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MulDiv]
neg eax
mov dword [0x41d108], eax
mov eax, dword [esp + 0x1c]
push edi
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push 3
call fcn.00402c1d
pop ecx
mov ecx, dword [esp + 0x3c]
push dword [esp + 0x30]
mov dword [0x41d118], eax
mov al, cl
and al, 1
mov byte [0x41d11f], 1
mov byte [0x41d11c], al
mov al, cl
and al, 2
and cl, 4
push 0x41d124
mov byte [0x41d11d], al
mov byte [0x41d11e], cl
call fcn.00404ef3
push 0x41d108
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
jmp 0x4018c6
xor eax, eax
push eax
call fcn.00402c1d
push 1
mov esi, eax
call fcn.00402c1d
cmp dword [esp + 0x40], 0
pop ecx
pop ecx
push eax
push esi
jne 0x401e31
call dword [sym.imp.USER32.dll_ShowWindow]
jmp case.0x4013bf.20
call dword [sym.imp.USER32.dll_EnableWindow]
jmp case.0x4013bf.20
xor ebp, ebp
push ebp
call fcn.00402c59
push 0x31
mov ebx, eax
call fcn.00402c59
push 0x22
mov esi, eax
call fcn.00402c59
push 0x15
mov edi, eax
call fcn.00402c59
push 0x40d108
push 0xffffffffffffffec
call fcn.00404d73
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x5c], eax
xor eax, eax
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x70], ecx
cmp word [ebx], bp
mov dword [esp + 0x64], esi
cmovne eax, ebx
mov dword [esp + 0x60], eax
xor eax, eax
cmp word [edi], bp
mov dword [esp + 0x6c], 0x4d1000
cmovne eax, edi
mov dword [esp + 0x68], eax
lea eax, [esp + 0x54]
push eax
call fcn.00405874
test eax, eax
je 0x401506
test byte [esp + 0x58], 0x40
je case.0x4013bf.20
push dword [esp + 0x8c]
call fcn.004053be
push dword [esp + 0x8c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp case.0x4013bf.20
xor eax, eax
push eax
call fcn.00402c59
mov esi, eax
push esi
push 0xffffffffffffffeb
call fcn.00404d73
push esi
call fcn.00405580
mov ebx, dword [esp + 0x10]
mov esi, eax
test esi, esi
je 0x401506
cmp dword [esp + 0x34], 0
je 0x401f34
push esi
call fcn.004053be
cmp dword [esp + 0x30], 0
jl 0x401f28
push eax
push dword [esp + 0x1c]
call fcn.004054c9
jmp 0x401f34
xor ecx, ecx
inc ecx
test eax, eax
cmovne ebx, ecx
mov dword [esp + 0x10], ebx
push esi
jmp 0x401ed7
push 2
call fcn.00402c59
push eax
call fcn.00405479
mov edi, eax
test edi, edi
je 0x401f5b
push dword [edi + 0x14]
push esi
call fcn.004054c9
push dword [edi + 0x18]
jmp 0x4014b4
xor eax, eax
mov word [ebp], ax
mov word [esi], ax
jmp 0x401506
push 0xffffffffffffffee
call fcn.00402c59
lea ecx, [esp + 0x54]
mov dword [esp + 0x44], eax
push ecx
push eax
push 0xa
call fcn.00405767
call eax
xor ecx, ecx
mov dword [esp + 0x14], eax
xor ebx, ebx
mov word [ebp], cx
inc ebx
mov word [esi], cx
test eax, eax
je 0x402ac7
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x402ac7
push 0xb
call fcn.00405767
push 0xc
mov esi, eax
call fcn.00405767
push edi
push dword [esp + 0x18]
mov dword [esp + 0x54], eax
xor eax, eax
push eax
push dword [esp + 0x50]
call esi
test eax, eax
je 0x402017
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x4c]
push eax
push 0x407270
push edi
call dword [esp + 0x5c]
test eax, eax
je 0x402017
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x38]
push dword [ecx + eax*4 + 8]
push ebp
call fcn.004054c9
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x48]
push dword [eax + ecx*4 + 0xc]
push dword [esp + 0x1c]
call fcn.004054c9
xor eax, eax
mov ebx, eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x402ac7
xor edi, edi
inc edi
cmp dword [0x478260], 0
mov ebx, edi
jl 0x402100
push 0xfffffffffffffff0
call fcn.00402c59
mov esi, eax
push edi
mov dword [esp + 0x18], esi
call fcn.00402c59
cmp dword [esp + 0x3c], 0
mov ebp, eax
mov dword [esp + 0x44], ebp
je 0x402066
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
test esi, esi
jne 0x402078
mov esi, dword [esp + 0x14]
push 8
xor eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
je 0x4020f7
push ebp
push esi
call fcn.00405276
mov ebp, eax
test ebp, ebp
je 0x4020c7
xor eax, eax
mov ebx, eax
cmp dword [esp + 0x34], eax
je 0x4020a7
push 0x40d108
push dword [esp + 0x38]
call fcn.00404d73
call ebp
test eax, eax
je 0x4020d2
mov ebx, edi
jmp 0x4020d2
mov eax, dword [esp + 0x1c]
push section..data
push 0x409100
push section..gdata
push 0x2000
push eax
call ebp
add esp, 0x14
jmp 0x4020d2
push dword [esp + 0x44]
push 0xfffffffffffffff7
call fcn.00404d73
cmp dword [esp + 0x38], 0
jne 0x402ac7
push esi
call fcn.00403926
test eax, eax
je 0x402ac7
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x402ac7
push 0x40d108
push 0xfffffffffffffff6
jmp 0x402107
push 0x40d108
push 0xffffffffffffffe7
call fcn.00404d73
jmp 0x402ac7
push 0xfffffffffffffff0
call fcn.00402c59
push 0xffffffffffffffdf
mov dword [esp + 0x28], eax
call fcn.00402c59
mov ebx, eax
push 2
mov dword [esp + 0x18], ebx
call fcn.00402c59
push 0xffffffffffffffcd
mov dword [esp + 0x24], eax
call fcn.00402c59
push 0x45
mov dword [esp + 0x4c], eax
call fcn.00402c59
mov ebp, dword [esp + 0x3c]
mov esi, ebp
mov dword [esp + 0x1c], eax
mov eax, ebp
and eax, 0xfff
sar esi, 0xc
mov dword [esp + 0x4c], eax
and esi, 7
mov eax, ebp
sar ebp, 0x10
and eax, 0x8000
push ebx
mov dword [esp + 0x48], eax
call fcn.00405c1d
test eax, eax
jne 0x402180
push 0x21
call fcn.00402c59
lea eax, [esp + 0x10]
xor edi, edi
push eax
push 0x407a38
inc edi
xor eax, eax
push edi
push eax
push 0x407a58
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ebx, eax
test ebx, ebx
js 0x402262
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push 0x407a48
push eax
mov ecx, dword [eax]
call dword [ecx]
mov ebx, eax
test ebx, ebx
js 0x402258
mov eax, dword [esp + 0x10]
push dword [esp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
cmp dword [esp + 0x44], 0
mov ebx, eax
jne 0x4021e9
mov eax, dword [esp + 0x10]
push 0x4d1000
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
test esi, esi
je 0x4021f8
mov eax, dword [esp + 0x10]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov eax, dword [esp + 0x10]
push ebp
push eax
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov edx, dword [esp + 0x48]
xor eax, eax
cmp word [edx], ax
je 0x40221d
mov eax, dword [esp + 0x10]
push dword [esp + 0x4c]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x44]
mov eax, dword [esp + 0x10]
push dword [esp + 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [esp + 0x10]
push dword [esp + 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
test ebx, ebx
js 0x40224e
mov eax, dword [esp + 0x18]
push edi
push dword [esp + 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
mov ebx, eax
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, ebx
sar eax, 0x1f
and eax, 0xfffffffc
push 0x40d108
sub eax, 0xc
push eax
call fcn.00404d73
shr ebx, 0x1f
jmp 0x402ac7
xor ebp, ebp
push ebp
call fcn.00402c59
push 0x11
mov esi, eax
call fcn.00402c59
push 0x23
mov edi, eax
call fcn.00402c59
push esi
mov ebx, eax
call fcn.00405479
test eax, eax
jne 0x4022b3
push ebp
push 0xfffffffffffffff9
call fcn.00404d73
jmp 0x401506
mov eax, dword [esp + 0x1c]
push esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], 2
call sub.KERNEL32.dll_lstrlenW
xor ecx, ecx
push edi
mov word [esi + eax*2 + 2], cx
call sub.KERNEL32.dll_lstrlenW
xor ecx, ecx
push ebx
push ebp
mov word [edi + eax*2 + 2], cx
mov ax, word [esp + 0x3c]
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], edi
mov dword [esp + 0x76], ebx
mov word [esp + 0x6c], ax
call fcn.00404d73
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
test eax, eax
je case.0x4013bf.20
jmp 0x4022a6
cmp ecx, 0xbadf00d
jne 0x401b20
inc dword [0x4782d4]
jmp case.0x4013bf.20
xor ebp, ebp
inc ebp
cmp dword [esp + 0x3c], 0
jne 0x402357
push 2
call fcn.00402cdc
mov esi, eax
test esi, esi
je 0x40236e
push 0x33
call fcn.00402c59
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push esi
mov ebp, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40236e
push 0x22
call fcn.00402c59
mov ecx, dword [esp + 0x3c]
sar ecx, 1
push ecx
push eax
push edi
call fcn.00402c97
mov ebp, eax
xor ebx, ebx
test ebp, ebp
setne bl
jmp 0x402ac7
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x40]
push 2
mov dword [esp + 0x1c], eax
call fcn.00402c59
push 0x11
mov dword [esp + 0x4c], eax
call fcn.00402c59
lea ecx, [esp + 0x14]
xor edi, edi
push ecx
push 0x100022
push eax
push dword [esp + 0x30]
inc edi
mov ebx, edi
call fcn.00402c3e
push eax
call fcn.004052b2
mov ebp, dword [esp + 0x14]
xor ecx, ecx
test eax, eax
cmovne ebp, ecx
mov dword [esp + 0x24], ebp
test ebp, ebp
je 0x402ac7
mov eax, dword [esp + 0x44]
mov esi, 0x411108
cmp eax, edi
jne 0x4023f5
push 0x23
call fcn.00402c59
push esi
call sub.KERNEL32.dll_lstrlenW
lea ebp, [eax*2 + 2]
jmp 0x402426
push 4
pop ebp
cmp eax, ebp
jne 0x40240b
push 3
call fcn.00402c1d
pop ecx
mov dword [0x411108], eax
jmp 0x402426
xor ecx, ecx
mov ebp, ecx
cmp eax, 3
jne 0x402426
push 0xc000
push esi
push ecx
push dword [esp + 0x44]
call fcn.00402ee2
mov ebp, eax
push ebp
push esi
push dword [esp + 0x20]
mov esi, dword [esp + 0x30]
xor eax, eax
push eax
push dword [esp + 0x58]
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
neg eax
sbb eax, eax
and ebx, eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402ac7
push 0x20019
call fcn.00402cdc
push 0x33
mov esi, eax
call fcn.00402c59
xor ecx, ecx
mov word [ebp], cx
test esi, esi
je 0x401506
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], 0x4000
push ecx
push ebp
lea ecx, [esp + 0x28]
push ecx
xor ecx, ecx
push ecx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor edi, edi
inc edi
test eax, eax
jne 0x4024d0
cmp dword [esp + 0x20], 4
je 0x4024b9
cmp dword [esp + 0x20], edi
je 0x4024aa
cmp dword [esp + 0x20], 2
jne 0x4024d0
mov ebx, dword [esp + 0x3c]
xor eax, eax
mov word [ebp + 0x3ffe], ax
jmp 0x402444
push dword [ebp]
xor ebx, ebx
cmp dword [esp + 0x40], ebx
push ebp
sete bl
call fcn.004054c9
jmp 0x402444
xor eax, eax
mov ebx, edi
mov word [ebp], ax
jmp 0x402444
push 0x20019
call fcn.00402cdc
push 3
mov esi, eax
call fcn.00402c1d
mov ebx, dword [esp + 0x14]
pop ecx
xor ecx, ecx
mov word [ebp], cx
test esi, esi
je 0x401506
cmp dword [esp + 0x3c], 0
mov ecx, 0x1fff
mov dword [esp + 0x24], ecx
je 0x40251f
push ecx
push ebp
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
jmp 0x40253f
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
lea ecx, [esp + 0x34]
push ecx
push ebp
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
xor ecx, ecx
inc ecx
test eax, eax
cmovne ebx, ecx
mov dword [esp + 0x10], ebx
xor eax, eax
push esi
mov word [ebp + 0x3ffe], ax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp case.0x4013bf.20
push ebp
call fcn.00405a3f
test eax, eax
je case.0x4013bf.20
push eax
jmp 0x401ed7
push 0xffffffffffffffed
call fcn.00402c59
push dword [esp + 0x34]
push dword [esp + 0x34]
push eax
call fcn.0040579c
cmp eax, 0xffffffff
jne 0x4018c6
xor eax, eax
mov word [ebp], ax
jmp 0x401506
mov eax, dword [esp + 0x34]
xor ebx, ebx
cmp edx, 0x38
mov dword [esp + 0x24], eax
mov esi, 0x40d108
sete bl
xor edi, edi
inc edi
test eax, eax
je 0x4025c1
push edi
call fcn.00402c1d
mov esi, ebx
mov word [0x40d108], ax
xor esi, edi
pop ecx
inc esi
jmp 0x4025fc
cmp edx, 0x38
jne 0x4025eb
push 0x21
call fcn.00402c59
push 0x2000
push esi
push 0x411108
call fcn.00405313
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
jmp 0x4025fc
push 0x11
call fcn.00402c59
push eax
call sub.KERNEL32.dll_lstrlenW
mov esi, eax
add esi, esi
xor eax, eax
cmp word [ebp], ax
je 0x402637
push ebp
call fcn.00405a3f
or ebx, dword [esp + 0x24]
mov ebp, eax
jne 0x402623
cmp dword [esp + 0x38], ebx
je 0x402623
push ebp
push ebp
call fcn.0040532e
test eax, eax
js 0x402637
push esi
push 0x40d108
push ebp
call fcn.0040588c
test eax, eax
jne case.0x4013bf.20
mov ebx, edi
jmp 0x402ac7
xor eax, eax
mov ebx, eax
push 2
pop eax
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x50], eax
call fcn.00402c1d
xor edi, edi
inc edi
pop ecx
cmp eax, edi
jl case.0x4013bf.20
mov ecx, 0x1fff
cmp eax, ecx
cmovg eax, ecx
mov dword [esp + 0x14], eax
xor eax, eax
cmp word [ebp], ax
je 0x4027cf
push ebp
mov dword [esp + 0x48], eax
call fcn.00405a3f
mov ebp, eax
mov dword [esp + 0x48], ebp
cmp dword [esp + 0x14], ebx
jbe 0x4027cf
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x50], 0xd
mov dword [esp + 0x54], 0xa
cmp dword [esp + 0x28], 0x39
jne 0x402764
xor eax, eax
push eax
lea eax, [esp + 0x24]
push eax
push 2
pop eax
sub eax, ecx
push eax
lea eax, [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4027cf
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x4c], ebp
test ebp, ebp
je 0x4027cf
cmp dword [esp + 0x38], 0
movzx eax, byte [esp + 0x10]
mov dword [esp + 0x1c], eax
jne 0x402813
push edi
lea eax, [esp + 0x20]
push eax
push ebp
lea eax, [esp + 0x1c]
push eax
push 8
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x40278e
mov ecx, ebp
neg ecx
sub dword [esp + 0x20], 1
mov eax, 0xfffd
mov dword [esp + 0x1c], eax
je 0x402792
push edi
xor eax, eax
dec ebp
inc ecx
mov dword [esp + 0x50], ebp
push eax
push ecx
push dword [esp + 0x54]
mov dword [esp + 0x34], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x28]
lea eax, [esp + 0x1c]
push eax
push 8
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [esp + 0x24]
test eax, eax
je 0x402717
jmp 0x40278e
test ecx, ecx
jne 0x402779
test ebx, ebx
jne 0x402779
xor eax, eax
push eax
push ebp
call fcn.0040532e
test eax, eax
js 0x4027cf
push 2
lea eax, [esp + 0x20]
push eax
push ebp
call fcn.004057c9
test eax, eax
je 0x4027cf
mov ebp, dword [esp + 0x4c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
test ecx, ecx
jne 0x402813
mov edx, dword [esp + 0x44]
cmp dx, word [esp + 0x50]
je 0x4027e0
cmp dx, word [esp + 0x54]
je 0x4027e0
mov word [esi + ebx*2], ax
inc ebx
movzx eax, ax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x44], eax
test ax, ax
je 0x4027cf
mov ebp, dword [esp + 0x48]
cmp ebx, dword [esp + 0x14]
jl 0x4026a7
xor eax, eax
mov word [esi + ebx*2], ax
xor ebx, ebx
cmp dword [esp + 0x18], eax
jmp 0x4017d9
cmp dx, ax
je 0x402800
push 0xd
pop ecx
cmp ax, cx
je 0x4027f5
push 0xa
pop ecx
cmp ax, cx
jne 0x402800
mov word [esi + ebx*2], ax
inc ebx
mov dword [esp + 0x18], ebx
jmp 0x4027cf
push edi
xor eax, eax
neg ebp
push eax
push ebp
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4027cf
movzx eax, ax
push eax
push esi
call fcn.004054c9
jmp 0x402acd
xor ebx, ebx
cmp word [ebp], bx
je case.0x4013bf.20
push 2
call fcn.00402c1d
pop ecx
push dword [esp + 0x38]
push ebx
push eax
push ebp
call fcn.00405a3f
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [esp + 0x30], ebx
jl case.0x4013bf.20
push eax
push esi
jmp 0x4014b5
push ebp
call fcn.00405a3f
test eax, eax
je case.0x4013bf.20
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp case.0x4013bf.20
push esi
call fcn.00405a3f
test eax, eax
je 0x401698
lea ecx, [esp + 0x90]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x401698
lea eax, [esp + 0xbc]
push eax
push ebp
jmp 0x401b16
push 2
call fcn.00402c59
lea ecx, [esp + 0x90]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x4028cc
xor eax, eax
mov word [esi], ax
jmp 0x402586
push eax
push esi
call fcn.004054c9
jmp 0x402899
push 0xfffffffffffffff0
mov edi, 0xfffffd66
call fcn.00402c59
mov ebx, eax
push ebx
call fcn.00405c1d
test eax, eax
jne 0x4028f4
push 0xffffffffffffffed
call fcn.00402c59
push ebx
call fcn.004059b7
push 2
push 0x40000000
push ebx
call fcn.0040579c
mov esi, eax
mov dword [esp + 0x54], esi
cmp esi, 0xffffffff
je 0x4029cb
cmp dword [esp + 0x34], 0
mov edi, dword [esp + 0x30]
je 0x4029b7
mov eax, dword [0x478208]
push eax
push 0x40
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
je 0x4029b7
xor eax, eax
push eax
call fcn.00402d4c
push dword [esp + 0x14]
push ebp
call fcn.00402d36
push dword [esp + 0x34]
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
mov dword [esp + 0x50], edi
test edi, edi
je 0x4029a2
push dword [esp + 0x34]
xor eax, eax
push edi
push eax
push dword [esp + 0x3c]
call fcn.00402ee2
cmp byte [edi], 0
je 0x402998
mov esi, dword [edi]
mov eax, dword [edi + 4]
add edi, 8
push esi
push edi
add eax, ebp
push eax
call fcn.0040555e
add edi, esi
cmp byte [edi], 0
jne 0x40297b
mov esi, dword [esp + 0x54]
push dword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [esp + 0x14]
push ebp
push esi
call fcn.0040588c
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
or edi, 0xffffffff
xor eax, eax
push eax
push eax
push esi
push edi
call fcn.00402ee2
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xfffffffffffffff3
pop esi
test edi, edi
jns 0x4029e1
push 0xffffffffffffffef
pop esi
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ebx, ebx
inc ebx
jmp 0x4029e5
mov ebx, dword [esp + 0x10]
push 0x40d108
push esi
jmp 0x402107
mov eax, dword [esp + 0x38]
xor ebx, ebx
sub eax, ebx
je 0x402a44
sub eax, 1
jne case.0x4013bf.20
push 2
call fcn.00402c1d
push 4
mov esi, eax
call fcn.00402c1d
pop ecx
movzx edx, al
pop ecx
shr eax, 0x18
mov ecx, 0x4782c0
test esi, esi
mov dword [esp + 0x14], ebx
push edx
cmovne ecx, esi
add eax, ecx
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.0040555e
push dword [esp + 0x14]
push dword [esp + 0x1c]
jmp 0x4014b5
push 5
call fcn.00405767
push 0x22
mov edi, eax
call fcn.00402c59
test edi, edi
je 0x402a93
lea ecx, [esp + 0x54]
push ecx
push eax
call dword [sym.imp.ole32.dll_IIDFromString]
test eax, eax
js 0x402a93
lea eax, [esp + 0x14]
push eax
push ebx
push dword [esp + 0x40]
lea eax, [esp + 0x60]
push eax
call edi
test eax, eax
js 0x402a93
push dword [esp + 0x14]
push esi
call fcn.0040599b
push dword [esp + 0x14]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp case.0x4013bf.20
xor ebx, ebx
inc ebx
xor eax, eax
mov word [esi], ax
jmp 0x402ac7
and ecx, dword [0x43ed50]
xor ebx, ebx
push ebx
push ecx
push 0xb
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [esp + 0x2c], ebx
je case.0x4013bf.20
mov eax, dword [esp + 0x1c]
push ebx
push ebx
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ebx, dword [esp + 0x10]
add dword [0x4782c8], ebx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2d0
ret 4