Function at 0x4176e0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a07b8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4c9144]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
xor eax, eax
mov byte [ebp - 4], 2
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x24], 0x40
cmp byte [ebp + 0x14], bl
jne 0x417747
mov dword [ebp - 0x24], 0x240
mov eax, dword [ebp + 0x18]
cmp dword [eax - 0xc], ebx
je 0x417768
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x417768
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x20], 0x4176b0
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x34], ecx
call fcn.0041b8b0
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x14]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x400
or eax, ecx
jge 0x4177a2
mov eax, 0x400
lea ecx, [ebp - 0x14]
call fcn.00417470
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x2c], edx
cmp dword [eax - 0xc], ebx
jne 0x4177f7
mov ebx, dword [0x4d2918]
push str.DefaultDirectoryTitle
push str.OpenSaveFile
lea ecx, [ebp + 0xc]
push ecx
call fcn.0041b1b0
lea edi, [ebp + 0x10]
mov byte [ebp - 4], 4
call fcn.00417620
mov byte [ebp - 4], 3
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4177f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ebx, ebx
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x34]
push edx
mov dword [ebp - 0x28], ecx
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov edi, eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.00489835
add esp, 8
cmp eax, ebx
jl 0x417987
mov ecx, dword [ebp - 0x14]
cmp eax, dword [ecx - 8]
jg 0x417987
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x14]
xor ecx, ecx
mov word [edx + eax*2], cx
lea eax, [ebp + 0x14]
push eax
call fcn.0041b8b0
mov byte [ebp - 4], 5
cmp edi, ebx
je 0x4178d5
mov edx, dword [ebp + 0x14]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x400
or eax, ecx
jge 0x417875
mov eax, 0x400
lea ecx, [ebp + 0x14]
call fcn.00417470
mov edx, dword [ebp + 0x14]
push edx
push edi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.00489835
add esp, 8
cmp eax, ebx
jl 0x417987
mov ecx, dword [ebp + 0x14]
cmp eax, dword [ecx - 8]
jg 0x417987
mov dword [ecx - 0xc], eax
mov edx, dword [ebp + 0x14]
xor ecx, ecx
mov word [edx + eax*2], cx
lea eax, [ebp + 0xc]
push eax
mov dword [ebp + 0xc], ebx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
js 0x4178d5
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
push edi
push eax
call edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
call fcn.004175b0
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 3
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x417908
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41792b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41794d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4179bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00417580
mov dword [ebp - 4], 1
mov eax, 0x41799e
ret
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret