Function at 0x407f60
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push 0x2a4
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x407f8b
mov dword [ebp + 0x14], 2
mov eax, dword [ebp + 0x14]
jmp 0x408551
push 0xa4
push 0
mov eax, dword [ebp - 8]
push eax
call fcn.00515e20
add esp, 0xc
cmp dword [ebp + 0x18], 0
je 0x407fe6
mov ecx, dword [ebp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edx, dword [ebp - 8]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 0x30], 0
jne 0x407fd5
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x407f7c
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [ebp - 8]
mov dword [edx + 0x24], 0xffffffff
mov eax, dword [ebp + 0x14]
and eax, 0x3ffffff7
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 1
je 0x4080f7
cmp dword [ebp - 0x3c], 2
je 0x40804c
cmp dword [ebp - 0x3c], 4
je 0x408016
jmp 0x408194
push 2
push 0
push 0
mov ecx, dword [ebp - 8]
add ecx, 4
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x408041
jmp 0x4080be
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 4], ecx
jmp 0x4080c7
mov edx, dword [ebp + 0x14]
and edx, 0x80000000
je 0x40807b
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
jmp 0x40809d
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0xffffffff
jne 0x4080be
mov dword [ebp + 0x14], 1
mov eax, dword [ebp - 8]
push eax
call fcn.00406f70
add esp, 4
jmp 0x407f83
mov ecx, dword [ebp - 8]
mov dword [ecx], 2
push 1
push 0
push 0
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 0xc], 0xffffffff
jne 0x4080f2
mov dword [ebp + 0x14], 0x10
jmp 0x4080ad
jmp 0x408194
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 4], ecx
cmp dword [ebp + 0xc], 0
je 0x408111
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0x10]
mov dword [edx + 0x10], eax
jmp 0x40818b
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp + 0xc], eax
push 0xa
movzx ecx, word [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40814d
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x408159
mov dword [ebp + 0x14], 4
jmp 0x4080ad
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [ebp - 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0
jne 0x408177
jmp 0x40837a
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [ebp - 8]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 8]
mov dword [eax], 1
mov ecx, dword [ebp + 0x14]
and ecx, 8
je 0x4081e3
push 0x2a
push 0
mov edx, dword [ebp - 8]
add edx, 0x38
push edx
call fcn.00515e20
add esp, 0xc
mov eax, 8
mov ecx, dword [ebp - 8]
mov word [ecx + 0x3e], ax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0xc]
mov dword [edx + 0x5e], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
or eax, 8
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
mov edx, dword [ebp - 8]
mov dword [edx + 0x24], 0
jmp 0x4083c7
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
and ecx, 1
jne 0x40820b
push 2
push 0
push 0
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 8]
sub eax, dword [ecx + 0xc]
mov dword [ebp - 0x14], eax
jmp 0x408220
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x10]
mov dword [edx + 0x14], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], 0xffff
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x14]
jbe 0x408235
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x20], edx
push 0x404
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x408374
mov dword [ebp - 0x18], 4
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
jae 0x40836a
mov ecx, dword [ebp - 0x18]
add ecx, 0x400
cmp ecx, dword [ebp - 0x20]
jbe 0x408278
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x18], edx
jmp 0x408283
mov eax, dword [ebp - 0x18]
add eax, 0x400
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x14]
sub ecx, dword [ebp - 0x18]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x14]
sub edx, dword [ebp - 4]
cmp edx, 0x404
jbe 0x4082a3
mov dword [ebp - 0x40], 0x404
jmp 0x4082ac
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 4]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x28], ecx
push 0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.00406d70
add esp, 0xc
test eax, eax
jne 0x4082e0
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.00406360
add esp, 0xc
test eax, eax
jne 0x4082e5
jmp 0x40836a
mov ecx, dword [ebp - 0x28]
sub ecx, 3
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
sub eax, 1
mov dword [ebp - 0x24], eax
test edx, edx
jl 0x408365
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x24]
movzx edx, byte [ecx]
cmp edx, 0x50
jne 0x408363
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x24]
movzx ecx, byte [eax + 1]
cmp ecx, 0x4b
jne 0x408363
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x24]
movzx eax, byte [edx + 2]
cmp eax, 5
jne 0x408363
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x24]
movzx edx, byte [ecx + 3]
cmp edx, 6
jne 0x408363
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x24]
mov dword [ebp - 4], ecx
push 0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.00406d70
add esp, 0xc
jmp 0x4083f9
jmp 0x4082ee
jmp 0x408256
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x1c], 0
jne 0x408386
mov dword [ebp + 0x14], 2
jmp 0x4080ad
push 0
push 0
mov edx, dword [ebp - 8]
push edx
call fcn.00406d70
add esp, 0xc
mov eax, dword [ebp - 8]
push eax
call fcn.00408560
add esp, 4
movzx ecx, ax
mov dword [ebp + 0x14], ecx
cmp dword [ebp + 0x14], 0x8b1f
je 0x4083bd
mov dword [ebp + 0x14], 6
jmp 0x4080ad
mov edx, dword [ebp - 8]
mov dword [edx + 0x2c], 3
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
mov dword [eax + 0x20], edx
mov eax, dword [ebp - 8]
mov dword [eax + 8], 0
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
or edx, 4
mov eax, dword [ebp - 8]
mov dword [eax], edx
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x18], 1
jmp 0x4084f4
mov edx, dword [ebp - 8]
push edx
call fcn.00407c20
add esp, 4
mov eax, dword [ebp - 8]
push eax
call fcn.00408560
add esp, 4
mov word [ebp - 0x2c], ax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00408560
add esp, 4
mov word [ebp - 0x38], ax
mov edx, dword [ebp - 8]
push edx
call fcn.00408560
add esp, 4
movzx eax, ax
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x18], eax
mov edx, dword [ebp - 8]
push edx
call fcn.00408560
add esp, 4
mov word [ebp - 0x34], ax
mov eax, dword [ebp - 8]
cmp dword [eax + 8], 0
je 0x408458
jmp 0x4083b1
movzx ecx, word [ebp - 0x34]
mov edx, dword [ebp - 8]
cmp ecx, dword [edx + 0x18]
jne 0x408474
movzx eax, word [ebp - 0x38]
test eax, eax
jne 0x408474
movzx ecx, word [ebp - 0x2c]
test ecx, ecx
je 0x408480
mov dword [ebp + 0x14], 8
jmp 0x4080ad
mov edx, dword [ebp - 8]
push edx
call fcn.00407c20
add esp, 4
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 8]
push eax
call fcn.00407c20
add esp, 4
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x2c], eax
mov edx, dword [ebp - 8]
push edx
call fcn.00408560
add esp, 4
movzx eax, ax
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x1c], eax
mov edx, dword [ebp - 8]
cmp dword [edx + 8], 0
jne 0x4084d5
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
add ecx, dword [eax + 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x2c]
add eax, dword [ebp - 0x30]
cmp ecx, eax
jae 0x4084da
jmp 0x4083b1
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
add edx, dword [ecx + 0xc]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x2c]
add ecx, dword [ebp - 0x30]
sub edx, ecx
mov eax, dword [ebp - 8]
mov dword [eax + 0x20], edx
mov ecx, dword [ebp - 8]
add ecx, 0xa4
push ecx
push 0x1ff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x408524
mov edx, dword [ebp - 8]
add edx, dword [ebp - 4]
movzx eax, byte [edx + 0xa3]
cmp eax, 0x5c
je 0x408547
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 4]
mov byte [ecx + 0xa4], 0x5c
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
mov byte [eax + 0xa4], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 8]
mov dword [ecx], edx
xor eax, eax
mov esp, ebp
pop ebp
ret