Function at 0x470470
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], eax
mov eax, dword [0x597010]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov esi, dword [0x59d954]
test esi, esi
je 0x470571
mov dword [ebp - 0x1c], 0x5828b1
mov dword [ebp - 0x18], 1
lea edi, [esi + 0x18]
lea ebx, [esi + 0x1c]
lea eax, [ebp - 0x1c]
lea edx, [ebp - 0x28]
mov ecx, edi
push eax
push edx
call fcn.0047ae90
cmp dword [ebp - 0x28], ebx
jne 0x4704e5
mov dword [ebp - 0x1c], str.vmodule
mov dword [ebp - 0x18], 7
mov ecx, edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0047ae90
cmp dword [ebp - 0x28], ebx
je 0x470571
mov ecx, esi
push 7
push str.vmodule
lea edi, [ebp - 0x1c]
push edi
call fcn.00478c40
mov ecx, esi
push 1
push 0x5828b1
lea ebx, [ebp - 0x28]
push ebx
call fcn.00478c40
push 0x10
call fcn.005283f4
add esp, 4
mov esi, eax
mov ecx, eax
push 0x59d910
push edi
push ebx
call fcn.004adb40
cmp byte [ebp - 0x1d], 0
js 0x470535
cmp byte [ebp - 0x11], 0
js 0x470546
test esi, esi
jne 0x470555
jmp 0x470571
push dword [ebp - 0x28]
call fcn.00528424
add esp, 4
cmp byte [ebp - 0x11], 0
jns 0x47052f
push dword [ebp - 0x1c]
call fcn.00528424
add esp, 4
test esi, esi
je 0x470571
xor eax, eax
lock cmpxchg dword [0x59d918], esi
je 0x470571
mov ecx, esi
call fcn.004ae0c0
push esi
call fcn.00528424
add esp, 4
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebx]
mov dword [0x599b48], eax
test al, 1
jne 0x470593
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00528e13
mov al, 1
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [0x59d914]
test eax, eax
je 0x4705c0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x59d914], 0
mov esi, dword [0x59d90c]
test esi, esi
jne 0x4705ef
and byte [0x599b48], 0xfe
jmp 0x4705ca
mov esi, dword [0x59d90c]
test esi, esi
jne 0x4705ef
push 0xc
call fcn.005283f4
add esp, 4
mov esi, eax
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 8], 0
mov dword [0x59d90c], eax
mov edi, dword [ebx + 4]
test edi, edi
je 0x4706bf
push edi
call fcn.00542c14
add esp, 4
movzx ecx, byte [esi + 0xb]
test cl, cl
js 0x470619
mov edx, esi
cmp eax, 4
jbe 0x47064f
mov edx, 4
jmp 0x470629
mov edx, 0x7fffffff
and edx, dword [esi + 8]
dec edx
cmp edx, eax
jae 0x47064d
mov ecx, dword [esi + 4]
mov dword [ebp - 0x2c], ecx
mov ebx, eax
sub ebx, edx
mov ecx, esi
push edi
push eax
mov eax, dword [ebp - 0x2c]
push eax
push 0
push eax
push ebx
push edx
call fcn.0044e0be
mov ebx, dword [ebp - 0x30]
cmp dword [ebx + 0xc], 0
jne 0x4706a9
jmp 0x470695
mov edx, dword [esi]
mov dword [ebp - 0x2c], edx
lea ecx, [eax + eax]
push ecx
push edi
push edx
mov edi, eax
call fcn.0052bc90
add esp, 0xc
cmp byte [esi + 0xb], 0
js 0x470683
mov ecx, dword [ebp - 0x2c]
cmp edi, 5
jae 0x4706c2
mov eax, edi
mov byte [esi + 0xb], al
mov word [ecx + edi*2], 0
cmp dword [ebx + 0xc], 0
jne 0x4706a9
jmp 0x470695
mov dword [esi + 4], edi
mov eax, dword [ebp - 0x2c]
mov word [eax + edi*2], 0
cmp dword [ebx + 0xc], 0
jne 0x4706a9
mov eax, dword [0x59d90c]
cmp byte [eax + 0xb], 0
jns 0x4706a2
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00528e13
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.004706d0
int3
int3