Function at 0x4876d0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4df472
mov eax, dword fs:[0]
push eax
sub esp, 0x470
mov eax, dword [0x520404]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 8]
push 0
mov dword [ebp - 0x46c], eax
call fcn.004b5299
mov dword [ebp - 0x47c], eax
lea eax, [ebp - 0x47c]
push eax
lea eax, [ebp - 0x43c]
mov dword [ebp - 0x478], edx
push eax
call fcn.004b8471
add esp, 0xc
test eax, eax
jne 0x487ae6
lea eax, [ebp - 0x43c]
push eax
push 0x4e67f8
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004b81c3
add esp, 0x10
test eax, eax
jne 0x487765
mov word [ebp - 0x110], ax
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x464]
call fcn.00477a20
lea eax, [ebp - 0x464]
mov dword [ebp - 4], 1
push eax
lea ecx, [ebx + 0x10]
call fcn.00477bd0
mov edx, dword [ebp - 0x464]
or esi, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4877b4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebx + 0x10]
lea eax, [ebp - 0x430]
push eax
call fcn.00479860
add esp, 8
mov edx, eax
cmp dword [edx + 0x14], 8
mov dword [ebp - 4], 2
jb 0x4877d7
mov edx, dword [edx]
test edx, edx
jne 0x4877df
xor ecx, ecx
jmp 0x487803
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x468], eax
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4877f0
sub ecx, dword [ebp - 0x468]
sar ecx, 1
push ecx
push edx
lea ecx, [ebx + 0x18]
call fcn.00478540
mov edx, dword [ebp - 0x41c]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x487854
mov ecx, dword [ebp - 0x430]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x48784a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x487af0
push edx
push ecx
call fcn.004a7d37
add esp, 8
push dword [ebx + 0x18]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x48786b
push dword [ebx + 0x18]
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
mov edi, dword [ebp - 0x46c]
lea eax, [ebx + 0x14]
test edi, edi
jne 0x48787c
xor ecx, ecx
jmp 0x487893
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x487881
sub ecx, edx
lea eax, [ebx + 0x14]
sar ecx, 1
push ecx
push edi
mov ecx, eax
call fcn.00478540
mov ecx, ebx
call fcn.00488200
push 0x208
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.004ac800
add esp, 0xc
lea eax, [ebp - 0x418]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov edi, eax
call fcn.004782d0
mov ecx, eax
test ecx, ecx
je 0x487af5
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x464], eax
push edi
lea ecx, [ebp - 0x464]
mov dword [ebp - 4], 3
call fcn.00477ee0
test al, al
jne 0x48793c
test edi, edi
jne 0x487918
xor ecx, ecx
jmp 0x48792f
mov ecx, edi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x487920
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x464]
call fcn.00478540
lea eax, [ebp - 0x47c]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 0x460]
push eax
call fcn.004b8471
add esp, 8
test eax, eax
jne 0x487aff
lea eax, [ebp - 0x460]
push eax
push 0x4e67f8
lea eax, [ebp - 0x210]
push 0x80
push eax
call fcn.004b81c3
add esp, 0x10
test eax, eax
jne 0x48798c
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x468]
call fcn.00477a20
lea eax, [ebx + 0x14]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x468]
push eax
lea eax, [ebp - 0x46c]
push eax
call fcn.0047f1d0
push str..log
push eax
lea eax, [ebp - 0x474]
mov byte [ebp - 4], 7
push eax
call fcn.0047f280
add esp, 0x18
mov edx, dword [ebp - 0x46c]
mov eax, esi
mov byte [ebp - 4], 9
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4879f3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x468]
mov eax, esi
mov byte [ebp - 4], 0xa
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x487a14
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x474]
push eax
lea eax, [ebx + 0x18]
push eax
lea eax, [ebp - 0x470]
push eax
call fcn.0048bbd0
add esp, 0xc
mov dword [ebx + 0x1c], 0
push 0
push 0x80
push 4
push 0
push 7
push 0x40000000
push dword [ebp - 0x470]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 0x1c], eax
cmp eax, 0xffffffff
je 0x487a68
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp - 0x470]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x487a85
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x474]
mov eax, esi
mov byte [ebp - 4], 4
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x487aa6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x464]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x487ac8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a7f4e
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.00477ec0
call fcn.004af45f
push 0x80004005
call fcn.00477ec0
push 0x80070057
call fcn.00477ec0
int3