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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x270
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x513490
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov ecx, dword [0x6d301c]
mov edx, dword fs:[0x2c]
mov eax, dword [0x6d2778]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x482018
cmp byte [0x6d275c], 0
jne 0x481f3c
lea esi, [ebp - 0x70]
mov byte [0x6d275c], 1
push esi
call fcn.00482210
add esp, 4
cmp dword [ebp - 0x60], 0
je 0x481f01
mov dword [ebp - 0x10], 3
lea eax, [ebp - 0x34]
push esi
mov dword [ebp - 0x38], eax
push eax
call fcn.004c8330
add esp, 8
cmp dword [ebp - 0x24], 0
je 0x481ec6
mov dword [ebp - 0x10], 4
push 0
lea eax, [ebp - 0x34]
push eax
call fcn.00429aa0
add esp, 8
test al, al
je 0x481e41
cmp dword [ebp - 0x20], 7
jbe 0x481bd4
mov eax, dword [ebp - 0x34]
jmp 0x481bd7
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
jne 0x481c48
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
mov edx, ecx
sub edx, eax
cmp edx, 4
jae 0x481c1f
sub esp, 0x10
mov al, byte [ebp - 0x27c]
lea ecx, [ebp - 0x34]
mov byte [esp + 4], al
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x678866
mov dword [esp], 4
call fcn.0040b010
jmp 0x481c48
lea edx, [eax + 4]
cmp ecx, 7
mov dword [ebp - 0x24], edx
jbe 0x481c2f
mov ecx, dword [ebp - 0x34]
jmp 0x481c32
lea ecx, [ebp - 0x34]
mov dword [ecx + eax*2 + 4], 0x650078
mov dword [ecx + eax*2], 0x65002e
mov word [ecx + eax*2 + 8], 0
cmp dword [ebp - 0x20], 7
jbe 0x481c53
mov eax, dword [ebp - 0x34]
jmp 0x481c56
lea eax, [ebp - 0x34]
push str.drwtsn32.exe
push eax
call fcn.005d3f0e
add esp, 8
test eax, eax
je 0x481d23
lea ecx, [ebp - 0x27c]
call fcn.004a1d40
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x10], 5
call fcn.004a1d60
test al, al
je 0x481dbc
lea ecx, [ebp - 0x58]
call fcn.004a1f70
lea eax, [ebp - 0x34]
mov dword [ebp - 0x3c], 7
mov dword [ebp - 0x40], 0
mov word [ebp - 0x50], 0
mov dword [ebp - 0x10], 6
lea ecx, [ebp - 0x50]
push eax
push 1
push ecx
call fcn.004c87e0
add esp, 0xc
mov ecx, dword [ebp - 0x3c]
mov ebx, eax
cmp ecx, 8
jb 0x481d03
mov eax, dword [ebp - 0x50]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x481cf9
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x482097
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
lea ecx, [ebp - 0x58]
call fcn.004a1fc0
lea ecx, [ebp - 0x27c]
call fcn.004a1e70
test bl, bl
jne 0x481e41
jmp 0x481ec6
lea esi, [ebp - 0x27c]
push 0x20a
push 0
push esi
call fcn.0061e8c0
add esp, 0xc
push esi
push 0
push 0
push 0x29
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
mov edi, 0x658578
js 0x481d7d
cmp word [ebp - 0x27c], 0
je 0x481d7d
push str.drwtsn32.exe
lea eax, [ebp - 0x27c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
mov eax, 0x658578
lea edi, [ebp - 0x27c]
cmove edi, eax
mov dword [ebp - 0x3c], 7
mov dword [ebp - 0x40], 0
mov word [ebp - 0x50], 0
push edi
call fcn.005d3244
add esp, 4
mov esi, eax
cmp eax, 7
jbe 0x481dcc
sub esp, 0xc
mov al, byte [ebp - 0x58]
lea ecx, [ebp - 0x50]
mov byte [esp + 4], al
mov dword [esp + 8], edi
mov dword [esp], esi
call fcn.00405590
jmp 0x481de8
lea ecx, [ebp - 0x27c]
call fcn.004a1e70
jmp 0x481ec6
mov eax, esi
mov dword [ebp - 0x40], esi
lea ecx, [ebp - 0x50]
add eax, esi
push eax
push edi
push ecx
call fcn.0061e340
add esp, 0xc
mov word [ebp + esi*2 - 0x50], 0
mov ecx, dword [ebp - 0x20]
cmp ecx, 8
jb 0x481e23
mov eax, dword [ebp - 0x34]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x481e19
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x48208b
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
movsd xmm0, qword [ebp - 0x40]
movsd xmm2, qword [ebp - 0x50]
movsd xmm1, qword [ebp - 0x48]
movsd qword [ebp - 0x24], xmm0
movsd qword [ebp - 0x2c], xmm1
movsd qword [ebp - 0x34], xmm2
cmp dword [ebp - 0x20], 7
jbe 0x481e4d
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x10], 4
push dword [ebp - 0x38]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x481ec6
mov esi, dword [ebp - 0x24]
cmp dword [ebp - 0x20], 7
jbe 0x481e6f
mov eax, dword [ebp - 0x34]
jmp 0x481e72
lea eax, [ebp - 0x34]
mov ecx, dword [0x6d2774]
cmp ecx, esi
jae 0x481e9c
sub esp, 0xc
mov cl, byte [ebp - 0x27c]
mov byte [esp + 4], cl
mov ecx, 0x6d2760
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.00405590
jmp 0x481ec6
cmp ecx, 7
mov edi, 0x6d2760
jbe 0x481eac
mov edi, dword [0x6d2760]
lea ecx, [esi + esi]
mov dword [0x6d2770], esi
push ecx
push eax
push edi
call fcn.0061e340
add esp, 0xc
mov word [edi + esi*2], 0
mov ecx, dword [ebp - 0x20]
cmp ecx, 8
jb 0x481f01
mov eax, dword [ebp - 0x34]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x481ef7
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x48207f
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
mov ecx, dword [ebp - 0x5c]
cmp ecx, 8
jb 0x481f3c
mov eax, dword [ebp - 0x70]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x481f32
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x482073
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
mov eax, dword [ebp + 8]
mov esi, dword [0x6d2770]
cmp dword [0x6d2774], 7
mov edx, 0x6d2760
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
jbe 0x481f67
mov edx, dword [0x6d2760]
cmp esi, 7
ja 0x481f85
movsd xmm0, qword [edx]
movsd xmm1, qword [edx + 8]
mov edi, 7
movsd qword [eax + 8], xmm1
movsd qword [eax], xmm0
jmp 0x481ffd
mov edi, esi
mov ecx, 0x7ffffffe
mov dword [ebp - 0x38], edx
or edi, 7
cmp edi, 0x7ffffffe
cmovb ecx, edi
lea eax, [ecx + ecx]
cmp ecx, 0x7ff
jb 0x481fd2
cmp ecx, 0x7fffffee
mov dword [ebp - 0x10], 0xffffffff
jae 0x48206e
add eax, 0x25
push eax
call fcn.005d0220
add esp, 4
mov ecx, eax
add eax, 0x23
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x481fe5
add eax, 2
mov dword [ebp - 0x10], 0xffffffff
push eax
call fcn.005d0220
add esp, 4
mov ebx, dword [ebp + 8]
lea ecx, [esi + esi + 2]
mov dword [ebx], eax
push ecx
push dword [ebp - 0x38]
push eax
call fcn.0061e340
mov eax, ebx
add esp, 0xc
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0x10], esi
mov dword [eax + 0x14], edi
mov dword fs:[0], ecx
add esp, 0x270
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x6d2778
call fcn.005d3d07
add esp, 4
cmp dword [0x6d2778], 0xffffffff
jne 0x481b61
mov dword [0x6d2774], 7
mov dword [0x6d2770], 0
mov word [0x6d2760], 0
push 0x50f950
call fcn.005cf77c
add esp, 4
push 0x6d2778
call fcn.005d3d59
add esp, 4
jmp 0x481b61
call fcn.005e8c60
mov dword [ebp - 0x10], 7
call fcn.006207e0
mov dword [ebp - 0x10], 2
call fcn.006207e0
mov dword [ebp - 0x10], 0
call fcn.006207e0
mov dword [ebp - 0x10], 1
call fcn.006207e0
nop word cs:[eax + eax]
nop dword [eax]
push ebp
sub esp, 0x14
add ebp, 0xc
call fcn.0061de80
nop dword [eax]
push ebp
sub esp, 0x14
add ebp, 0xc
call fcn.0061de80
nop dword [eax]
push ebp
sub esp, 0x14
add ebp, 0xc
mov ecx, dword [ebp - 0x3c]
cmp ecx, 8
jb 0x48210e
mov eax, dword [ebp - 0x50]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x482104
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x48211b
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
lea ecx, [ebp - 0x58]
call fcn.004a1fc0
add esp, 0x14
pop ebp
ret
call fcn.006207e0
push ebp
sub esp, 0x14
add ebp, 0xc
lea ecx, [ebp - 0x27c]
call fcn.004a1e70
add esp, 0x14
pop ebp
ret