Function at 0x476c40
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4df0b9
mov eax, dword fs:[0]
push eax
sub esp, 0x474
mov eax, dword [0x5203c4]
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
push 0
mov dword [ebp - 0x468], 0
call fcn.004b7246
mov dword [ebp - 0x480], eax
lea eax, [ebp - 0x480]
push eax
lea eax, [ebp - 0x43c]
mov dword [ebp - 0x47c], edx
push eax
call fcn.004b723b
add esp, 0xc
test eax, eax
jne 0x47708c
lea eax, [ebp - 0x43c]
push eax
push 0x4e682c
lea eax, [ebp - 0x110]
push 0x80
push eax
call fcn.004b6f09
add esp, 0x10
test eax, eax
jne 0x476cd6
mov word [ebp - 0x110], ax
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x464]
call fcn.00475420
lea eax, [ebp - 0x464]
mov dword [ebp - 4], 1
push eax
lea ecx, [ebx + 0x10]
call fcn.00475ed0
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 0x476d25
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.00478c70
add esp, 8
mov edx, eax
cmp dword [edx + 0x14], 8
mov dword [ebp - 4], 2
jb 0x476d48
mov edx, dword [edx]
test edx, edx
jne 0x476d50
xor ecx, ecx
jmp 0x476d73
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x468], eax
jmp 0x476d60
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x476d60
sub ecx, dword [ebp - 0x468]
sar ecx, 1
push ecx
push edx
lea ecx, [ebx + 0x18]
call fcn.00477ed0
mov edx, dword [ebp - 0x41c]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x476dc4
mov ecx, dword [ebp - 0x430]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x476dba
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x477096
push edx
push ecx
call fcn.004a8c37
add esp, 8
push dword [ebx + 0x18]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x476ddb
push dword [ebx + 0x18]
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0
lea ecx, [ebx + 0x14]
push 0x4f9904
call fcn.00477ed0
mov ecx, ebx
call fcn.00477a40
push 0x208
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.004ad7b0
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.00476b10
mov ecx, eax
test ecx, ecx
je 0x47709b
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.00476480
test al, al
jne 0x476e8c
test edi, edi
jne 0x476e66
xor ecx, ecx
jmp 0x476e7f
mov ecx, edi
lea edx, [ecx + 2]
jmp 0x476e70
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x476e70
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x464]
call fcn.00477ed0
lea eax, [ebp - 0x480]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 0x460]
push eax
call fcn.004b723b
add esp, 8
test eax, eax
jne 0x4770a5
lea eax, [ebp - 0x460]
push eax
push 0x4e682c
lea eax, [ebp - 0x210]
push 0x80
push eax
call fcn.004b6f09
add esp, 0x10
test eax, eax
jne 0x476edc
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x470]
call fcn.00475420
mov dword [ebp - 0x468], 3
mov eax, dword [ebp - 0x470]
mov byte [ebp - 4], 7
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x476f14
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x476f2a
call fcn.00476b10
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x4770af
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [ebx + 0x14]
add eax, 0x10
mov dword [ebp - 0x46c], eax
mov eax, dword [ebp - 0x470]
mov dword [ebp - 0x468], 7
push dword [ecx - 0xc]
push ecx
push dword [eax - 0xc]
push eax
lea eax, [ebp - 0x46c]
push eax
call fcn.00476600
push str..log
lea eax, [ebp - 0x46c]
push eax
lea eax, [ebp - 0x478]
push eax
call fcn.00475fa0
add esp, 0x20
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 0x476f9b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x470]
mov eax, esi
mov byte [ebp - 4], 0xa
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x476fbc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x478]
push eax
lea eax, [ebx + 0x18]
push eax
lea eax, [ebp - 0x474]
push eax
call fcn.004861a0
add esp, 0xc
mov dword [ebx + 0x1c], 0
push 0
push 0x80
push 4
push 0
push 7
push 0x40000000
push dword [ebp - 0x474]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 0x1c], eax
cmp eax, 0xffffffff
je 0x477010
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp - 0x474]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47702d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x478]
mov eax, esi
mov byte [ebp - 4], 4
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47704e
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 0x477070
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.004a8e4e
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00476460
call fcn.004b040f
push 0x80004005
call fcn.00476460
push 0x80070057
call fcn.00476460
push 0x80004005
call fcn.00476460
int3