Function at 0x479a60
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5155f8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x57d074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x18], esi
mov eax, dword [esi]
cmp dword [eax - 0xc], 0x104
jl 0x479c99
call fcn.0047a820
test al, al
jne 0x479c99
call fcn.0040d266
mov ecx, eax
test ecx, ecx
je 0x479cc5
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x534850
jne 0x479ccf
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0
mov edi, 0x533164
test edi, 0xffff0000
jne 0x479afa
movzx eax, di
lea ecx, [ebp - 0x10]
push eax
call fcn.0040d4c8
jmp 0x479c3b
push 0x533164
call fcn.004e07a4
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x479b95
lea ecx, [esi - 0x10]
mov edi, dword [ecx]
cmp dword [ecx + 4], eax
je 0x479c3b
cmp dword [ecx + 0xc], eax
lea edx, [ecx + 0xc]
jge 0x479b3b
cmp dword [esi - 8], eax
jl 0x479cd6
mov dword [esi - 0xc], eax
mov word [esi], ax
jmp 0x479c3b
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x479b68
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, 0x534850
jne 0x479ce0
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
cmp eax, 0x534850
jne 0x479ce9
lock inc dword [edi + 0x14]
lea eax, [edi + 8]
add eax, 0x10
mov dword [ebp - 0x10], eax
jmp 0x479c3b
add eax, 0x10
mov dword [ebp - 0x10], eax
jmp 0x479c3b
mov eax, dword [esi - 0xc]
sub edi, esi
sar edi, 1
mov dword [ebp - 0x14], eax
test ebx, ebx
js 0x479cf2
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x479bc4
push ebx
lea ecx, [ebp - 0x10]
call fcn.0040d637
mov esi, dword [ebp - 0x10]
lea ecx, [ebx + ebx]
cmp edi, dword [ebp - 0x14]
ja 0x479c11
mov eax, dword [esi - 8]
lea edx, [esi + edi*2]
test ecx, ecx
je 0x479c29
test edx, edx
jne 0x479bec
call fcn.004e08d4
mov dword [eax], 0x16
call fcn.004e0744
jmp 0x479c26
add eax, eax
cmp eax, ecx
jae 0x479c04
call fcn.004e08d4
mov dword [eax], 0x22
call fcn.004e0744
jmp 0x479c26
push ecx
push edx
push esi
call fcn.004dc330
add esp, 0xc
jmp 0x479c26
mov edx, dword [esi - 8]
push ecx
push 0x533164
add edx, edx
mov ecx, esi
call fcn.0040d710
add esp, 8
lea ecx, [ebx + ebx]
cmp ebx, dword [esi - 8]
jg 0x479cd6
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [ecx + esi], ax
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x10]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.00410e44
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, 1
sete bl
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x479ca7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, 0x534850
jne 0x479cfc
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x479ca7
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, 1
sete bl
test bl, bl
jne 0x479cb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov al, bl
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.0040d795
call edx
jmp 0x479acf
push 0x80070057
call fcn.0040d795
mov ecx, edx
call esi
jmp 0x479b68
mov ecx, edi
call edx
jmp 0x479b8a
push 0x80070057
call fcn.0040d795
call edx
jmp 0x479ca7