Function at 0x470670
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51aa85
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x5c5c30]
xor eax, ebp
mov dword [ebp - 0x20], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x264], ecx
xor eax, eax
cmp dword [ebp + 8], 0
setne al
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
jne 0x4706cd
push 0xff
push 0x552ea0
call fcn.0045b590
test eax, eax
je 0x4706cd
int3
cmp dword [ebp - 0x238], 0
jne 0x4706db
call fcn.00431d30
xor edx, edx
jne 0x4706a1
mov eax, dword [ebp - 0x264]
cmp dword [eax + 8], 0
jne 0x4706ff
push 0x100
push 0x552ed8
call fcn.0045b590
test eax, eax
je 0x4706ff
int3
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x264]
add ecx, 0x1c
call fcn.0040b370
movzx ecx, al
test ecx, ecx
je 0x47073e
cmp dword [ebp - 0x18], 0
je 0x47073e
push 0
mov edx, dword [ebp - 0x264]
add edx, 0x1c
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.0049cb60
mov edx, dword [ebp - 0x264]
mov ecx, dword [edx + 8]
call fcn.0040b370
movzx eax, al
test eax, eax
je 0x470797
mov ecx, dword [ebp - 0x264]
add ecx, 0x1c
call fcn.0040b370
movzx ecx, al
test ecx, ecx
jne 0x470784
mov ecx, dword [ebp - 0x264]
add ecx, 0x1c
call fcn.0040d7e0
push eax
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0xc]
call edx
push 0
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov eax, dword [edx]
call eax
jmp 0x470b6b
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0xc], 0
jne 0x4707a5
jmp 0x470b6b
mov dword [ebp - 0x1c], 0
jmp 0x4707b7
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [eax + 4]
jge 0x4707de
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
add eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0xc]
call fcn.0043f0a0
jmp 0x4707ae
lea edx, [ebp - 0x22c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x470802
cmp dword [ebp - 0x10], 0x104
jb 0x470807
jmp 0x470b6b
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0
jge 0x470837
push 0x11c
push 0x552f10
call fcn.0045b590
test eax, eax
je 0x470837
int3
mov edx, dword [ebp - 0x234]
mov word [ebp + edx*2 - 0x22c], 0x5c
mov eax, dword [ebp - 0x234]
add eax, 1
mov dword [ebp - 0x234], eax
mov ecx, dword [ebp - 0x234]
mov word [ebp + ecx*2 - 0x22c], 0
lea ecx, [ebp - 0x230]
call fcn.0040ac00
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.0040ac00
mov byte [ebp - 4], 1
mov dword [ebp - 0x1c], 0
jmp 0x470896
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [eax + 4]
jge 0x470b23
push 1
mov edx, dword [ebp - 0x234]
push edx
lea eax, [ebp - 0x22c]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x230]
push edx
mov eax, dword [ebp - 0x264]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x264]
mov eax, dword [edx + 8]
call eax
test eax, eax
jne 0x4708df
jmp 0x470b23
lea ecx, [ebp - 0x230]
call fcn.0040d7e0
mov dword [ebp - 0x254], eax
lea ecx, [ebp - 0x230]
call fcn.0040b360
shl eax, 1
push eax
lea ecx, [ebp - 0x14]
call fcn.0040bf20
mov dword [ebp - 0x258], eax
mov ecx, dword [ebp - 0x254]
movzx edx, word [ecx]
test edx, edx
je 0x4709ae
mov eax, dword [ebp - 0x254]
movzx ecx, word [eax]
cmp ecx, 0x26
jne 0x470945
mov edx, dword [ebp - 0x258]
mov word [edx], 0x26
mov eax, dword [ebp - 0x258]
add eax, 2
mov dword [ebp - 0x258], eax
xor ecx, ecx
je 0x470979
mov edx, dword [ebp - 0x258]
mov eax, dword [ebp - 0x254]
mov cx, word [eax]
mov word [edx], cx
mov edx, dword [ebp - 0x258]
add edx, 2
mov dword [ebp - 0x258], edx
mov eax, dword [ebp - 0x254]
add eax, 2
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x258]
mov edx, dword [ebp - 0x254]
mov ax, word [edx]
mov word [ecx], ax
mov ecx, dword [ebp - 0x258]
add ecx, 2
mov dword [ebp - 0x258], ecx
mov edx, dword [ebp - 0x254]
add edx, 2
mov dword [ebp - 0x254], edx
jmp 0x47090c
mov eax, dword [ebp - 0x258]
mov word [eax], 0
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call fcn.00426f40
mov ecx, dword [ebp - 0x264]
mov edx, dword [ecx + 0x14]
mov eax, dword [ebp - 0x1c]
lea eax, [eax + edx + 1]
xor edx, edx
mov ecx, 0x10
div ecx
mov dword [ebp - 0x23c], edx
cmp dword [ebp - 0x23c], 0xa
jle 0x470a0a
mov edx, dword [ebp - 0x23c]
push edx
push 0x552f48
push 0xa
lea eax, [ebp - 0x250]
push eax
call fcn.004da980
add esp, 0x10
jmp 0x470a48
cmp dword [ebp - 0x23c], 0xa
jne 0x470a2b
push str.10
push 0xa
lea ecx, [ebp - 0x250]
push ecx
call fcn.00429a40
add esp, 0xc
jmp 0x470a48
mov edx, dword [ebp - 0x23c]
push edx
push 0x552f5c
push 0xa
lea eax, [ebp - 0x250]
push eax
call fcn.004da980
add esp, 0x10
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x268], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x26c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
add eax, 1
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
add eax, 1
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x250]
push eax
lea ecx, [ebp - 0x25c]
call fcn.0040ac70
mov dword [ebp - 0x270], eax
mov ecx, dword [ebp - 0x270]
mov dword [ebp - 0x274], ecx
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x274]
push edx
lea eax, [ebp - 0x260]
push eax
call fcn.00470f30
add esp, 0xc
mov dword [ebp - 0x278], eax
mov ecx, dword [ebp - 0x278]
mov dword [ebp - 0x27c], ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x27c]
call fcn.0040d7e0
push eax
mov edx, dword [ebp - 0x268]
push edx
push 0x400
mov eax, dword [ebp - 0x26c]
push eax
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0xc]
call fcn.0043f560
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x260]
call fcn.0040ad40
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x25c]
call fcn.0040ad40
jmp 0x47088d
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
sub eax, 1
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0xc]
call fcn.0043f2e0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x20], eax
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.0040ad40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x230]
call fcn.0040ad40
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.004d1610
mov esp, ebp
pop ebp
ret 4