Function at 0x518230
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56f020
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x5cf024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ecx + 0x10], 0
je 0x5185ed
cmp dword [ecx + 0x14], 8
jb 0x51826a
mov ecx, dword [ecx]
push ecx
lea ecx, [ebp - 0x24]
call fcn.00415390
mov dword [ebp - 4], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov byte [ebp - 4], 1
call fcn.004092a0
test eax, eax
je 0x5185ff
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 2
mov eax, 0x582d80
lea ecx, [ebp - 0x14]
test eax, 0xffff0000
jne 0x5182cb
movzx eax, ax
push eax
call fcn.00415230
jmp 0x5182d7
push 1
push 0x582d80
call fcn.00408e30
mov byte [ebp - 4], 3
lea eax, [ebp - 0x14]
push eax
lea edx, [ebp - 0x24]
lea ecx, [ebp - 0x3c]
call fcn.00517f70
add esp, 4
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [ebp - 0x14]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x51830e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x38]
sub esi, 1
mov dword [ebp - 0x14], esi
js 0x5185c2
nop dword [eax]
call fcn.004092a0
test eax, eax
je 0x5185ff
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
test esi, esi
je 0x5184d0
cmp esi, dword [ebp - 0x38]
jge 0x518613
mov eax, dword [ebp - 0x3c]
mov edi, dword [eax + esi*4]
lea ecx, [eax + esi*4]
mov dword [ebp - 0x18], ecx
mov eax, dword [edi - 0xc]
test eax, eax
je 0x5183ba
lea edx, [eax - 1]
test edx, edx
js 0x518609
cmp edx, eax
jg 0x518609
cmp word [edi + edx*2], 0x5c
jne 0x5183ba
push edx
lea eax, [ebp - 0x28]
push eax
call fcn.0040d130
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x10]
push eax
call fcn.00477830
mov byte [ebp - 4], 6
mov eax, ebx
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x5183b1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
dec esi
mov dword [ebp - 0x14], esi
jmp 0x5184ce
lea ebx, [esi - 1]
cmp esi, 1
jbe 0x5184cb
cmp ebx, dword [ebp - 0x38]
jge 0x518613
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax + ebx*4]
sub ecx, 0x10
call fcn.00408ad0
lea esi, [eax + 0x10]
mov dword [ebp - 0x20], esi
mov byte [ebp - 4], 0xa
mov edi, dword [esi - 0xc]
test edi, edi
je 0x5184a3
lea eax, [edi - 1]
test eax, eax
js 0x518609
cmp eax, edi
jg 0x518609
cmp word [esi + eax*2], 0x5c
jne 0x5184a3
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
cmp edi, dword [eax - 0xc]
jg 0x5184a3
mov ecx, dword [ebp - 0x10]
cmp edi, dword [ecx - 0xc]
jl 0x5184a3
cmp dword [esi - 4], 1
jle 0x51843f
push edi
lea ecx, [ebp - 0x20]
call fcn.00408c30
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x20]
mov eax, dword [ecx]
jmp 0x518442
mov ecx, dword [ebp - 0x18]
cmp dword [eax - 4], 1
jle 0x518455
push dword [eax - 0xc]
call fcn.00408c30
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
push edi
push esi
push eax
call fcn.00527916
add esp, 0xc
test eax, eax
jne 0x5184a1
mov eax, dword [esi - 0xc]
lea ecx, [ebp - 0x20]
dec eax
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040d130
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x10]
push eax
call fcn.00477830
mov byte [ebp - 4], 0xa
or eax, 0xffffffff
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x5184a1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x5184a3
mov byte [ebp - 4], 6
or eax, 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x5184bf
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
dec ebx
test ebx, ebx
jg 0x5183c6
mov esi, dword [ebp - 0x14]
or ebx, 0xffffffff
test esi, esi
js 0x518613
cmp esi, dword [ebp - 0x38]
jge 0x518613
mov eax, dword [ebp - 0x3c]
lea edi, [eax + esi*4]
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
je 0x518598
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.004092a0
test eax, eax
je 0x5185ff
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 0x10
push 0x5c
push dword [edi]
call fcn.0051f59b
add esp, 8
test eax, eax
je 0x518569
sub eax, dword [edi]
sar eax, 1
cmp eax, 0xffffffff
je 0x518569
push eax
lea eax, [ebp - 0x30]
mov ecx, edi
push eax
call fcn.0040d130
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x1c]
push eax
call fcn.00477830
mov byte [ebp - 4], 0x10
mov eax, ebx
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x518566
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x1c]
cmp dword [esi - 0xc], 0
je 0x51857a
lea edx, [ebp - 0x10]
lea ecx, [ebp - 0x1c]
call fcn.005180c0
mov byte [ebp - 4], 6
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x518595
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x14]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x5185b6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub esi, 1
mov dword [ebp - 0x14], esi
jns 0x518320
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x3c]
call fcn.0047e930
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x5185ed
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 esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00408f80
push 0x80070057
call fcn.00408f80
push 1
push 0xc000008c
call fcn.00411100
int3