Function at 0x409180
Capabilities:
Access the windows event log
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [ebp + 0xc]
test eax, eax
push ebx
push esi
mov esi, ecx
mov ecx, dword [ebp + 0x10]
push edi
mov dword [esi + 0x144], eax
mov dword [esi + 0x148], ecx
jge 0x4091b0
mov dword [esi + 0x144], 0
jmp 0x4091bf
cmp eax, 4
jle 0x4091bf
mov dword [esi + 0x144], 4
mov edx, dword [ebp + 8]
mov edi, dword [sym.imp.MSVCR71.dll__mbsnbcpy]
push 0x40
push edx
lea ebx, [esi + 0x104]
push ebx
call edi
mov eax, dword [ebp + 0x10]
add esp, 0xc
test eax, eax
mov byte [esi + 0x143], 0
jne 0x409464
push 0x104
lea eax, [ebp - 0x424]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push str.VMware_Virtual_Mount_Service_Extended
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
push esi
push 0x104
mov dword [esi + 0x14c], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0x104
lea ecx, [ebp - 0x21c]
push esi
push ecx
call edi
lea eax, [ebp - 0x21c]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409237
mov edi, dword [sym.imp.MSVCR71.dll__mbsnbcat]
sub eax, edx
mov edx, 0x103
sub edx, eax
push edx
lea eax, [ebp - 0x21c]
push ebx
push eax
call edi
lea eax, [ebp - 0x21c]
add esp, 0xc
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409264
sub eax, ecx
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [ebp - 0x21c]
push str..tst
push edx
call edi
add esp, 0xc
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x4092d5
push 0x104
lea ecx, [ebp - 0x424]
push ecx
push esi
call dword [sym.imp.MSVCR71.dll__mbsnbcpy]
push 0x5c
push esi
call dword [sym.imp.MSVCR71.dll__mbsrchr]
push eax
call dword [sym.imp.MSVCR71.dll__mbsinc]
add esp, 0x18
mov byte [eax], 0
jmp 0x4092e9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x21c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, esi
lea ecx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4092f0
sub eax, ecx
mov ecx, 0x103
sub ecx, eax
push ecx
push ebx
push esi
call edi
mov edi, dword [sym.imp.MSVCR71.dll__snprintf]
push 0xa
push esi
push str._s__d.log
lea edx, [ebp - 0x118]
push 0x104
push edx
call edi
add esp, 0x20
mov byte [ebp - 0x15], 0
mov ebx, 9
lea ecx, [ecx]
test ebx, ebx
jle 0x40934e
push ebx
push esi
push str._s__d.log
lea eax, [ebp - 0x320]
push 0x104
push eax
call edi
add esp, 0x14
jmp 0x409365
push esi
push str._s.log
lea ecx, [ebp - 0x320]
push 0x104
push ecx
call edi
add esp, 0x10
push 9
lea edx, [ebp - 0x118]
push edx
lea eax, [ebp - 0x320]
push eax
mov byte [ebp - 0x15], 0
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
xor eax, eax
mov cl, byte [ebp + eax - 0x320]
mov byte [ebp + eax - 0x118], cl
inc eax
test cl, cl
jne 0x409381
dec ebx
jns 0x409330
lea eax, [ebp - 0x118]
mov edx, esi
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4093a3
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x150], eax
jne 0x409445
mov eax, dword [esi + 0x14c]
test eax, eax
je 0x409445
mov edx, dword [str.Cant_open_log_file]
mov ecx, dword [0x427434]
mov dword [ebp - 0x14], edx
mov edx, dword [0x427438]
push 0
mov dword [ebp - 0xc], edx
mov edx, dword [0x427440]
mov dword [ebp - 4], edx
lea edx, [ebp + 0x10]
push edx
push 0
push 1
push 0
push 0xc0070003
mov dword [ebp - 0x10], ecx
mov ecx, dword [0x42743c]
push 0
mov dword [ebp - 8], ecx
push 1
lea ecx, [ebp - 0x14]
push eax
mov dword [ebp + 0x10], ecx
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
test eax, eax
jne 0x409445
mov eax, dword [esi + 0x14c]
push eax
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov dword [esi + 0x14c], 0
mov eax, dword [esi + 0x144]
cmp eax, 1
jle 0x409464
push eax
push esi
push str.Logging_in_file___s_._Level_set_to__d
push 7
push 0
push esi
call fcn.00409150
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc