Function at 0x59ad70
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff90
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov esi, ecx
mov dword [ebp - 4], edx
mov ebx, eax
lea eax, [ebp - 0x50]
mov edx, dword [0x543578]
call fcn.00403e38
xor eax, eax
push ebp
push 0x59af95
push dword fs:[eax]
mov dword fs:[eax], esp
mov al, byte [ebx + 0x170]
mov byte [ebp - 0x11], al
mov eax, dword [ebx + 0x16c]
mov dword [ebp - 0x1c], eax
cmp esi, 6
jne 0x59add2
mov edx, dword [ebx + 0x300]
mov eax, ebx
call fcn.0059914c
test al, al
jne 0x59add2
mov byte [ebp - 5], 0
jmp 0x59af5f
mov byte [ebp - 5], 1
mov byte [ebp - 0x50], 0
mov dword [ebp - 0x2c], esi
mov al, byte [0x59afa8]
mov byte [ebp - 0x4e], al
mov eax, dword [ebx + 0x16c]
mov dword [ebp - 0x28], eax
mov al, byte [ebx + 0x170]
mov byte [ebp - 0x4f], al
lea eax, [ebp - 0x20]
mov edx, dword [ebx + 0x160]
call fcn.004038bc
mov eax, ebx
call fcn.005c20a0
test al, al
je 0x59ae4a
mov eax, dword [ebx + 0x318]
cmp dword [eax + 0x18], 0
jne 0x59ae4a
cmp byte [ebx + 0x344], 0
je 0x59ae2a
cmp esi, 2
je 0x59ae4a
xor eax, eax
mov dword [ebp - 0xc], eax
mov esi, ebx
mov eax, dword [ebx + 0x300]
mov eax, dword [eax + 4]
push esi
mov esi, eax
lea edi, [ebp - 0x4c]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
pop esi
jmp 0x59aea6
mov ecx, ebx
mov dl, 1
mov eax, dword [0x533da0]
call fcn.00533edc
mov dword [ebp - 0xc], eax
mov edx, ebx
mov eax, dword [ebp - 0xc]
call fcn.00534564
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 8]
lea edx, [ebp - 0x70]
mov eax, esi
call fcn.005c5b44
push esi
lea esi, [ebp - 0x70]
lea edi, [ebp - 0x4c]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
pop esi
mov eax, dword [ebx + 0x318]
cmp dword [eax + 0x18], 0
jne 0x59aea6
dec dword [ebp - 0x38]
cmp dword [ebp - 0x38], 0
jne 0x59aea6
lea edx, [ebp - 0x3c]
or ecx, 0xffffffff
mov eax, ebx
call fcn.005c5ac0
mov eax, dword [esi + 0x164]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
call fcn.00658f24
mov edi, eax
mov dword [esi + 0x164], edi
inc edi
jne 0x59aedf
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.0062016c
cmp ax, 2
jne 0x59aeaf
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x164], eax
mov byte [ebp - 5], 0
cmp byte [ebp - 5], 0
je 0x59af4e
mov byte [esi + 0x42a], 1
lea eax, [ebp - 0x10]
mov edx, dword [esi + 0x160]
call fcn.004038bc
lea eax, [esi + 0x160]
mov edx, dword [ebp - 4]
call fcn.004038bc
lea edx, [ebp - 0x50]
mov eax, esi
call fcn.005b944c
test al, al
jne 0x59af24
mov eax, dword [esi + 0x164]
push eax
call sub.kernel32.dll_CloseHandle
jmp 0x59af39
mov eax, dword [esi + 0x164]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_DeleteFileW
lea eax, [esi + 0x160]
mov edx, dword [ebp - 0x10]
call fcn.004038bc
mov byte [esi + 0x42a], 0
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x164], eax
mov eax, dword [ebp - 0xc]
call fcn.004028c0
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x16c], eax
mov al, byte [ebp - 0x11]
mov byte [ebx + 0x170], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59af9c
lea eax, [ebp - 0x50]
mov edx, dword [0x543578]
call fcn.00403f00
lea eax, [ebp - 0x10]
call fcn.00403880
ret