Function at 0x404f50
Capabilities:
Get common file path

Disassembly:
sub esp, 0x418
mov eax, dword [0x419058]
xor eax, esp
mov dword [esp + 0x414], eax
mov eax, dword [esp + 0x420]
mov ecx, dword [esp + 0x424]
push ebx
mov ebx, dword [esp + 0x420]
push ebp
push esi
push edi
push 0x104
lea edx, [esp + 0x228]
push edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4059bf
lea eax, [esp + 0x224]
push eax
push 0x200
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x333], 0
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
mov edi, edi
cmp byte [eax], 0
je 0x404fdf
add eax, 1
sub ecx, 1
jne 0x404fd0
jmp 0x405001
test ecx, ecx
je 0x405001
mov eax, 0x200
sub eax, ecx
push str.ddraw.dll
mov edx, 0x200
sub edx, eax
push edx
lea eax, [esp + eax + 0x2c]
push eax
call fcn.00404ad0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x4050f1
push 0x5f
push 0
push 2
push 4
call fcn.00404ed0
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x405064
test ebx, ebx
je 0x40504a
mov dword [ebx], 1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x405054
mov dword [eax], ebp
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40505f
mov byte [eax], 0x20
mov ebp, 1
push 0x448
push 0
push 3
push 4
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x4050ac
test ebx, ebx
je 0x40508e
mov dword [ebx], 2
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40509c
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4050a7
mov byte [eax], 0x20
mov ebp, 1
push 0x44
push 0
push 4
push 4
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x4050f1
test ebx, ebx
je 0x4050d3
mov dword [ebx], 3
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4050e1
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4050ec
mov byte [eax], 0x20
mov ebp, 1
lea eax, [esp + 0x224]
push eax
push 0x200
lea ecx, [esp + 0x2c]
push ecx
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x405120
add eax, 1
sub ecx, 1
jne 0x405111
jmp 0x405142
test ecx, ecx
je 0x405142
mov eax, 0x200
sub eax, ecx
push str.d3drg8x.dll
mov edx, 0x200
sub edx, eax
push edx
lea eax, [esp + eax + 0x2c]
push eax
call fcn.00404ad0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x4051a7
push 0x46
push 0
push 4
push 4
call fcn.00404ed0
mov ecx, dword [esp + 0x28]
push edx
push eax
mov eax, dword [esp + 0x34]
push eax
push ecx
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x4051a7
test ebx, ebx
je 0x405187
mov dword [ebx], 3
mov esi, dword [esp + 0x14]
test esi, esi
je 0x405195
mov dword [esi], 0
mov edi, dword [esp + 0x10]
test edi, edi
je 0x4051a0
mov byte [edi], 0x61
mov ebp, 1
jmp 0x4051af
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
nop
cmp byte [eax], 0
je 0x4051df
add eax, 1
sub ecx, 1
jne 0x4051d0
jmp 0x405201
test ecx, ecx
je 0x405201
mov eax, 0x200
sub eax, ecx
push str.ddraw.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.00404ad0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x405307
push 0x9b
push 0
push 5
push 4
call fcn.00404ed0
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x40526b
test ebx, ebx
je 0x40524d
mov dword [ebx], 5
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40525b
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x405266
mov byte [eax], 0x20
mov ebp, 1
push 0x13e
push 0
push 6
push 4
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x4052b3
test ebx, ebx
je 0x405295
mov dword [ebx], 6
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4052a3
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4052ae
mov byte [eax], 0x20
mov ebp, 1
push 0x1b4
push 0
push 6
push 4
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x4052ff
test ebx, ebx
je 0x4052dd
mov dword [ebx], 6
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4052eb
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4052f6
mov byte [eax], 0x20
mov ebp, 1
mov edi, eax
jmp 0x405303
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x405336
add eax, 1
sub ecx, 1
jne 0x405327
jmp 0x405358
test ecx, ecx
je 0x405358
mov eax, 0x200
sub eax, ecx
push str.dplayx.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.00404ad0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x4053b6
push 0x206
push 3
push 6
push 4
call fcn.00404ed0
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x4053b6
test ebx, ebx
je 0x4053a0
mov dword [ebx], 6
test esi, esi
je 0x4053aa
mov dword [esi], 1
test edi, edi
je 0x4053b1
mov byte [edi], 0x61
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4053e5
add eax, 1
sub ecx, 1
jne 0x4053d6
jmp 0x405407
test ecx, ecx
je 0x405407
mov eax, 0x200
sub eax, ecx
push str.ddraw.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.00404ad0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x405465
push 0x2bc
push 0
push 7
push 4
call fcn.00404ed0
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x405465
test ebx, ebx
je 0x40544f
mov dword [ebx], 7
test esi, esi
je 0x405459
mov dword [esi], 0
test edi, edi
je 0x405460
mov byte [edi], 0x20
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x405494
add eax, 1
sub ecx, 1
jne 0x405485
jmp 0x4054b6
test ecx, ecx
je 0x4054b6
mov eax, 0x200
sub eax, ecx
push str.dinput.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.00404ad0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x405514
push 0x2cc
push 0
push 7
push 4
call fcn.00404ed0
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x405514
test ebx, ebx
je 0x4054fe
mov dword [ebx], 7
test esi, esi
je 0x405508
mov dword [esi], 0
test edi, edi
je 0x40550f
mov byte [edi], 0x61
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x405543
add eax, 1
sub ecx, 1
jne 0x405534
jmp 0x405565
test ecx, ecx
je 0x405565
mov eax, 0x200
sub eax, ecx
push str.ddraw.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.00404ad0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x405607
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x4055b2
push 0x190
push 0
push 8
push 4
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jge 0x4055db
cmp bx, 5
jne 0x405607
push 0x190
push 0x8d2
push 1
push 5
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x405607
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4055e9
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4055f7
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x405602
mov byte [eax], 0x20
mov ebp, 1
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x405636
add eax, 1
sub ecx, 1
jne 0x405627
jmp 0x405658
test ecx, ecx
je 0x405658
mov eax, 0x200
sub eax, ecx
push str.d3d8.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.00404ad0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x405775
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x4056a5
push 0x371
push 1
push 8
push 4
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jge 0x4056ce
cmp bx, 5
jne 0x4056fa
push 0x371
push 0xa28
push 1
push 5
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x4056fa
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4056dc
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4056ea
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4056f5
mov byte [eax], 0x20
mov ebp, 1
cmp bx, 4
jne 0x405720
push 0x385
push 1
push 8
push 4
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jge 0x405749
cmp bx, 5
jne 0x405775
push 0x385
push 0xa28
push 1
push 5
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x405775
mov eax, dword [esp + 0x20]
test eax, eax
je 0x405757
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x405765
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x405770
mov byte [eax], 0x61
mov ebp, 1
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x4057a4
add eax, 1
sub ecx, 1
jne 0x405795
jmp 0x4057c6
test ecx, ecx
je 0x4057c6
mov eax, 0x200
sub eax, ecx
push str.mpg2splt.ax
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.00404ad0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x405830
push 0x375
push 1
push 3
push 6
call fcn.00404ed0
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x405830
mov eax, dword [esp + 0x20]
test eax, eax
je 0x405812
mov dword [eax], 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x405820
mov dword [eax], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40582b
mov byte [eax], 0x62
mov ebp, 1
lea ecx, [esp + 0x224]
push ecx
push 0x200
lea edx, [esp + 0x2c]
push edx
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x40585f
add eax, 1
sub ecx, 1
jne 0x405850
jmp 0x405881
test ecx, ecx
je 0x405881
mov eax, 0x200
sub eax, ecx
push str.dpnet.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.00404ad0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x405925
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ebx, esi
shr ebx, 0x10
cmp bx, 4
jne 0x4058ce
push 0x86
push 0
push 9
push 4
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jge 0x4058f7
cmp bx, 5
jne 0x405925
push 0x86
push 0xe5d
push 2
push 5
call fcn.00404ed0
push edx
push eax
push esi
push edi
call fcn.00404ef0
add esp, 0x20
test eax, eax
jl 0x405925
mov edi, dword [esp + 0x20]
test edi, edi
je 0x405905
mov dword [edi], 8
mov esi, dword [esp + 0x14]
test esi, esi
je 0x405913
mov dword [esi], 2
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x40591e
mov byte [ebx], 0x20
mov ebp, 1
jmp 0x405931
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x20]
lea edx, [esp + 0x224]
push edx
push 0x200
lea eax, [esp + 0x2c]
push eax
call fcn.00404ad0
mov ecx, 0x200
lea eax, [esp + 0x24]
cmp byte [eax], 0
je 0x405960
add eax, 1
sub ecx, 1
jne 0x405951
jmp 0x405982
test ecx, ecx
je 0x405982
mov eax, 0x200
sub eax, ecx
push str.d3d9.dll
mov ecx, 0x200
sub ecx, eax
push ecx
lea edx, [esp + eax + 0x2c]
push edx
call fcn.00404ad0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00404e00
add esp, 8
test eax, eax
jl 0x4059b7
test edi, edi
je 0x4059a2
mov dword [edi], 9
test esi, esi
je 0x4059ac
mov dword [esi], 0
xor eax, eax
test ebx, ebx
je 0x4059e4
mov byte [ebx], 0x20
jmp 0x4059e4
test ebp, ebp
jne 0x4059e2
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x4059c9
mov dword [ebx], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4059d7
mov dword [eax], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4059e2
mov byte [eax], 0x20
xor eax, eax
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405cae
add esp, 0x418
ret