Function at 0x4d7110
Capabilities:
Check if file exists
Get common file path

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 0x5db278
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x2b0
mov eax, dword [0x63d284]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2b8], edx
mov dword [ebp - 0x2bc], ecx
push 0x104
lea eax, [ebp - 0x220]
mov dword [ebp - 0x2b4], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
xor eax, eax
mov dword [ebp - 0x250], 0
lea esi, [ebp - 0x220]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
lea ecx, [esi + 2]
mov word [ebp - 0x250], ax
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4d71b0
sub esi, ecx
mov eax, 0xa
sar esi, 1
cmp esi, 7
ja 0x4d71f7
mov dword [ebp - 0x240], esi
lea eax, [ebp - 0x220]
add esi, esi
push esi
push eax
lea eax, [ebp - 0x250]
push eax
call fcn.00572f50
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x250], ax
jmp 0x4d72b7
cmp esi, 0x7ffffffe
ja 0x4d7c3b
mov edi, esi
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x4d721c
mov edi, SysReAllocString
mov eax, 0xfffffffe
jmp 0x4d7238
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
cmp eax, 0x7fffffff
ja 0x4d7cd7
add eax, eax
cmp eax, 0x1000
jb 0x4d7261
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x4d7cd7
push ecx
call fcn.00591cad
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4d7c40
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x4d7280
test eax, eax
je 0x4d727e
push eax
call fcn.00591cad
add esp, 4
mov dword [ebp - 0x288], eax
test eax, eax
je 0x4d7c51
jmp 0x4d7286
xor eax, eax
mov dword [ebp - 0x288], eax
mov dword [ebp - 0x240], esi
lea ecx, [ebp - 0x220]
add esi, esi
mov dword [ebp - 0x23c], edi
push esi
push ecx
push eax
call fcn.005729d0
mov eax, dword [ebp - 0x288]
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x250], eax
mov word [esi + eax], cx
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x268], 0
push 0x20
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 7
mov word [ebp - 0x268], ax
call fcn.00591cad
mov esi, eax
add esp, 4
test esi, esi
je 0x4d7c62
movups xmm0, xmmword [str.regsvr32.exe]
xor eax, eax
mov dword [ebp - 0x258], 0xc
mov dword [ebp - 0x254], 0xf
movups xmmword [esi], xmm0
mov dword [ebp - 0x268], esi
movq xmm0, qword [0x612f1c]
movq qword [esi + 0x10], xmm0
mov word [esi + 0x18], ax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x240]
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], 7
mov word [ebp - 0x238], ax
mov dword [ebp - 0x2b4], 1
test ecx, ecx
jne 0x4d73a6
push 0x20
call fcn.00591cad
add esp, 4
test eax, eax
je 0x4d7c73
movups xmm0, xmmword [esi]
xor ecx, ecx
mov dword [ebp - 0x228], 0xc
mov dword [ebp - 0x224], 0xf
movups xmmword [eax], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [eax + 0x10], xmm0
mov word [eax + 0x18], cx
jmp 0x4d7a02
cmp dword [ebp - 0x23c], 8
lea edi, [ebp - 0x250]
mov eax, ecx
cmovae edi, dword [ebp - 0x250]
mov dword [ebp - 0x284], edi
mov dword [ebp - 0x298], eax
cmp eax, 7
ja 0x4d741a
lea esi, [ecx + ecx]
mov dword [ebp - 0x228], ecx
push esi
lea eax, [ebp - 0x238]
push edi
push eax
call fcn.00572f50
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x238], ax
mov edx, dword [ebp - 0x224]
mov esi, dword [ebp - 0x228]
mov edi, dword [ebp - 0x238]
mov dword [ebp - 0x294], edx
mov dword [ebp - 0x298], esi
mov dword [ebp - 0x28c], edi
jmp 0x4d74ff
cmp eax, 0x7ffffffe
ja 0x4d7c84
mov esi, eax
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x4d7444
mov esi, SysReAllocString
mov ecx, 0xfffffffe
mov dword [ebp - 0x294], esi
jmp 0x4d746e
cmp esi, 0xa
mov ecx, 0xa
cmovb esi, ecx
mov dword [ebp - 0x294], esi
lea ecx, [esi + 1]
cmp ecx, 0x7fffffff
ja 0x4d7cd7
add ecx, ecx
cmp ecx, 0x1000
jb 0x4d749b
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x4d7cd7
push eax
call fcn.00591cad
add esp, 4
test eax, eax
je 0x4d7c89
lea edi, [eax + 0x23]
and edi, 0xffffffe0
mov dword [edi - 4], eax
mov eax, dword [ebp - 0x298]
jmp 0x4d74c2
test ecx, ecx
je 0x4d74c0
push ecx
call fcn.00591cad
mov edi, eax
add esp, 4
mov dword [ebp - 0x28c], edi
test edi, edi
je 0x4d7c9a
mov eax, dword [ebp - 0x298]
jmp 0x4d74c8
xor edi, edi
mov dword [ebp - 0x28c], edi
mov dword [ebp - 0x224], esi
lea esi, [eax + eax]
push esi
push dword [ebp - 0x284]
mov dword [ebp - 0x228], eax
push edi
call fcn.005729d0
mov edx, dword [ebp - 0x294]
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x238], edi
mov word [esi + edi], ax
mov esi, dword [ebp - 0x298]
cmp dword [ebp - 0x23c], 8
lea eax, [ebp - 0x250]
mov ecx, dword [ebp - 0x240]
cmovae eax, dword [ebp - 0x250]
mov dword [ebp - 0x284], 0x2f
mov dword [ebp - 0x29c], 0x5c
movzx eax, word [eax + ecx*2 - 2]
mov ecx, SysReAllocString
mov dword [ebp - 0x290], ecx
cmp word [ebp - 0x284], ax
je 0x4d776c
cmp word [ebp - 0x29c], ax
je 0x4d776c
mov eax, edx
sub eax, esi
cmp eax, 1
jb 0x4d75ae
cmp edx, 8
lea eax, [ebp - 0x238]
mov edx, dword [ebp - 0x29c]
lea ecx, [esi + 1]
cmovae eax, edi
mov dword [ebp - 0x228], ecx
mov word [eax + esi*2], dx
xor edx, edx
mov word [eax + ecx*2], dx
mov edx, dword [ebp - 0x224]
mov eax, dword [ebp - 0x228]
mov edi, dword [ebp - 0x238]
mov dword [ebp - 0x294], edx
mov dword [ebp - 0x298], eax
mov dword [ebp - 0x28c], edi
jmp 0x4d7772
mov eax, ecx
mov dword [ebp - 0x284], esi
sub eax, esi
cmp eax, 1
jb 0x4d7cab
lea eax, [esi + 1]
mov dword [ebp - 0x2a8], edx
mov esi, eax
mov dword [ebp - 0x298], eax
or esi, 7
cmp esi, ecx
jbe 0x4d75e8
mov esi, ecx
mov eax, 0xfffffffe
mov dword [ebp - 0x294], esi
jmp 0x4d762f
mov eax, dword [ebp - 0x290]
mov ecx, edx
shr ecx, 1
sub eax, ecx
cmp edx, eax
jbe 0x4d760a
mov esi, SysReAllocString
mov eax, 0xfffffffe
mov dword [ebp - 0x294], esi
jmp 0x4d762f
lea eax, [edx + ecx]
cmp esi, eax
cmovb esi, eax
mov dword [ebp - 0x294], esi
lea eax, [esi + 1]
cmp eax, 0x7fffffff
ja 0x4d7cd7
add eax, eax
cmp eax, 0x1000
jb 0x4d765c
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x4d7cd7
push ecx
call fcn.00591cad
add esp, 4
test eax, eax
je 0x4d7cb0
mov edx, dword [ebp - 0x2a8]
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ecx - 4], eax
jmp 0x4d7683
test eax, eax
je 0x4d7681
push eax
call fcn.00591cad
mov ecx, eax
add esp, 4
mov dword [ebp - 0x288], ecx
test ecx, ecx
je 0x4d7cc1
mov edx, dword [ebp - 0x2a8]
jmp 0x4d7689
xor ecx, ecx
mov dword [ebp - 0x288], ecx
mov eax, dword [ebp - 0x298]
mov dword [ebp - 0x224], esi
mov esi, dword [ebp - 0x284]
add esi, esi
mov dword [ebp - 0x228], eax
lea eax, [ecx + eax*2]
mov dword [ebp - 0x284], eax
push esi
lea edi, [esi + ecx]
mov dword [ebp - 0x2a0], edi
mov edi, dword [ebp - 0x28c]
cmp edx, 8
jb 0x4d772e
push edi
push ecx
call fcn.005729d0
mov eax, dword [ebp - 0x2a0]
add esp, 0xc
mov ecx, dword [ebp - 0x29c]
mov word [eax], cx
xor ecx, ecx
mov eax, dword [ebp - 0x284]
mov word [eax], cx
mov eax, edi
mov ecx, dword [ebp - 0x2a8]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x4d7710
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4d7cd2
push ecx
push edi
call fcn.0056c61e
mov edi, dword [ebp - 0x288]
add esp, 8
mov dword [ebp - 0x28c], edi
mov dword [ebp - 0x238], edi
jmp 0x4d7772
lea eax, [ebp - 0x238]
push eax
push ecx
call fcn.005729d0
mov eax, dword [ebp - 0x2a0]
add esp, 0xc
mov edx, dword [ebp - 0x29c]
xor ecx, ecx
mov edi, dword [ebp - 0x288]
mov dword [ebp - 0x28c], edi
mov word [eax], dx
mov eax, dword [ebp - 0x284]
mov dword [ebp - 0x238], edi
mov word [eax], cx
jmp 0x4d7778
mov edi, dword [ebp - 0x28c]
mov edx, dword [ebp - 0x29c]
cmp dword [ebp - 0x254], 8
lea eax, [ebp - 0x268]
mov ecx, 0x2f
mov dword [ebp - 0x284], 0
cmovae eax, dword [ebp - 0x268]
movzx eax, word [eax]
cmp cx, ax
je 0x4d77a8
cmp dx, ax
jne 0x4d77b2
mov dword [ebp - 0x284], 1
cmp dword [ebp - 0x254], 8
lea edx, [ebp - 0x268]
mov eax, dword [ebp - 0x258]
cmovae edx, dword [ebp - 0x268]
mov ecx, dword [ebp - 0x284]
mov esi, dword [ebp - 0x294]
lea edx, [edx + eax*2]
lea eax, [ebp - 0x268]
cmovae eax, dword [ebp - 0x268]
lea eax, [eax + ecx*2]
mov ecx, dword [ebp - 0x298]
sub edx, eax
mov dword [ebp - 0x2a8], eax
mov eax, esi
sar edx, 1
sub eax, ecx
mov dword [ebp - 0x284], edx
cmp edx, eax
ja 0x4d7847
cmp dword [ebp - 0x294], 8
lea esi, [ebp - 0x238]
lea eax, [edx + edx]
cmovae esi, dword [ebp - 0x28c]
lea edi, [edx + ecx]
push eax
push dword [ebp - 0x2a8]
mov dword [ebp - 0x228], edi
lea ecx, [esi + ecx*2]
push ecx
call fcn.00572f50
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x4d7a08
mov eax, dword [ebp - 0x290]
sub eax, ecx
cmp eax, edx
jb 0x4d7cdc
lea eax, [edx + ecx]
mov edx, eax
mov dword [ebp - 0x2a0], eax
or edx, 7
cmp edx, 0x7ffffffe
jbe 0x4d787f
mov eax, SysReAllocString
mov dword [ebp - 0x288], eax
mov eax, 0xfffffffe
jmp 0x4d78c7
mov eax, esi
shr eax, 1
sub dword [ebp - 0x290], eax
cmp esi, dword [ebp - 0x290]
jbe 0x4d78a3
mov eax, SysReAllocString
mov dword [ebp - 0x288], eax
mov eax, 0xfffffffe
jmp 0x4d78c7
add eax, esi
cmp edx, eax
cmovb edx, eax
mov dword [ebp - 0x288], edx
lea eax, [edx + 1]
cmp eax, 0x7fffffff
ja 0x4d7cd7
add eax, eax
cmp eax, 0x1000
jb 0x4d78f6
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x4d7cd7
push ecx
call fcn.00591cad
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4d7ce1
mov edx, dword [ebp - 0x288]
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x4d791b
test eax, eax
je 0x4d7919
push eax
call fcn.00591cad
add esp, 4
mov dword [ebp - 0x290], eax
test eax, eax
je 0x4d7cf2
mov edx, dword [ebp - 0x288]
jmp 0x4d7921
xor eax, eax
mov dword [ebp - 0x290], eax
mov ecx, dword [ebp - 0x2a0]
mov dword [ebp - 0x228], ecx
mov ecx, dword [ebp - 0x298]
add ecx, ecx
mov dword [ebp - 0x224], edx
push ecx
lea edx, [eax + ecx]
mov dword [ebp - 0x288], edx
mov edx, dword [ebp - 0x284]
add edx, edx
mov dword [ebp - 0x284], edx
mov edx, dword [ebp - 0x2a0]
lea edx, [eax + edx*2]
mov dword [ebp - 0x2a0], edx
cmp esi, 8
jb 0x4d79c7
push edi
push eax
call fcn.005729d0
add esp, 0xc
push dword [ebp - 0x284]
push dword [ebp - 0x2a8]
push dword [ebp - 0x288]
call fcn.005729d0
mov eax, dword [ebp - 0x2a0]
lea esi, [esi*2 + 2]
xor ecx, ecx
add esp, 0xc
mov word [eax], cx
mov eax, edi
cmp esi, 0x1000
jb 0x4d79bb
mov edi, dword [edi - 4]
add esi, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4d7d03
push esi
push edi
call fcn.0056c61e
add esp, 8
jmp 0x4d79fc
lea ecx, [ebp - 0x238]
push ecx
push eax
call fcn.005729d0
add esp, 0xc
push dword [ebp - 0x284]
push dword [ebp - 0x2a8]
push dword [ebp - 0x288]
call fcn.005729d0
mov eax, dword [ebp - 0x2a0]
add esp, 0xc
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x290]
mov dword [ebp - 0x238], eax
mov edx, dword [ebp - 0x23c]
cmp edx, 8
jb 0x4d7a48
mov ecx, dword [ebp - 0x250]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4d7a3e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4d7d08
push edx
push ecx
call fcn.0056c61e
add esp, 8
movups xmm0, xmmword [ebp - 0x238]
movups xmmword [ebp - 0x250], xmm0
movq xmm0, qword [ebp - 0x228]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x254]
movq qword [ebp - 0x240], xmm0
cmp edx, 8
jb 0x4d7aaa
mov ecx, dword [ebp - 0x268]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4d7aa0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4d7d08
push edx
push ecx
call fcn.0056c61e
add esp, 8
cmp dword [ebp - 0x23c], 8
lea eax, [ebp - 0x250]
cmovae eax, dword [ebp - 0x250]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4d7bdd
xor eax, eax
mov dword [ebp - 0x280], 0
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
push 3
push 0x61c19c
lea ecx, [ebp - 0x280]
mov byte [ebp - 4], 3
call fcn.00407cc7
cmp dword [ebp - 0x2b8], 0
jne 0x4d7b25
push 4
push str.__u
lea ecx, [ebp - 0x280]
call fcn.0040993b
push 2
push 0x6130d4
lea ecx, [ebp - 0x280]
call fcn.0040993b
mov ecx, dword [ebp - 0x2bc]
mov eax, ecx
cmp dword [ecx + 0x14], 8
jb 0x4d7b47
mov eax, dword [ecx]
push dword [ecx + 0x10]
lea ecx, [ebp - 0x280]
push eax
call fcn.0040993b
push 1
push 0x6122dc
lea ecx, [ebp - 0x280]
call fcn.0040993b
lea eax, [ebp - 0x280]
push eax
lea eax, [ebp - 0x250]
push 0
push eax
call fcn.004d1350
mov edx, dword [ebp - 0x26c]
add esp, 0xc
cmp edx, 8
jb 0x4d7bc0
mov ecx, dword [ebp - 0x280]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4d7bb6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4d7d0d
push edx
push ecx
call fcn.0056c61e
add esp, 8
xor eax, eax
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
mov edx, dword [ebp - 0x23c]
cmp edx, 8
jb 0x4d7c1d
mov ecx, dword [ebp - 0x250]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4d7c13
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4d7d0d
push edx
push ecx
call fcn.0056c61e
add esp, 8
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.0056cd75
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.0040791f
push 0x638780
lea eax, [ebp - 0x2a9]
push eax
call fcn.0057359b
push 0x638780
lea eax, [ebp - 0x2aa]
push eax
call fcn.0057359b
push 0x638780
lea eax, [ebp - 0x2a1]
push eax
call fcn.0057359b
push 0x638780
lea eax, [ebp - 0x2a1]
push eax
call fcn.0057359b
call fcn.0040791f
push 0x638780
lea eax, [ebp - 0x2ab]
push eax
call fcn.0057359b
push 0x638780
lea eax, [ebp - 0x2ac]
push eax
call fcn.0057359b
call fcn.0040791f
push 0x638780
lea eax, [ebp - 0x2ad]
push eax
call fcn.0057359b
push 0x638780
lea eax, [ebp - 0x2ae]
push eax
call fcn.0057359b
call fcn.0057da80
call fcn.00407b84
call fcn.0040791f
push 0x638780
lea eax, [ebp - 0x2af]
push eax
call fcn.0057359b
push 0x638780
lea eax, [ebp - 0x2b0]
push eax
call fcn.0057359b
call fcn.0057da80
call fcn.0057da80
call fcn.0057da80
int3