Function at 0x10059a60
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100742ab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x120
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], esp
cmp eax, edi
jne 0x10059aa0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], esp
mov dword [ebp - 0x14], esp
push 0xc
call fcn.1003bfe0
mov esi, eax
add esp, 4
mov dword [ebp - 0x18], esi
cmp esi, edi
mov byte [ebp - 4], 1
je 0x10059aea
mov ebx, dword [ebp + 8]
mov dword [esi + 4], edi
push ebx
mov dword [esi + 8], 1
call fcn.1006e3e3
cmp eax, edi
mov dword [esi], eax
jne 0x10059aef
cmp ebx, edi
je 0x10059aef
push 0x8007000e
call fcn.1006e336
jmp 0x10059aef
mov ebx, dword [ebp + 8]
xor esi, esi
mov eax, dword [ebp - 0x14]
cmp esi, edi
mov byte [ebp - 4], 0
mov dword [eax], esi
jne 0x10059b06
push 0x8007000e
call fcn.1006e336
mov ecx, dword [ebp + 0xc]
call fcn.100151f0
jmp 0x10059b23
cmp ax, 0xffff
mov dword [ebp - 4], 0xffffffff
je 0x10059c8c
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x12c]
mov edi, eax
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edx, [ebp - 0x12c]
lea eax, [ebp - 0x12c]
push edx
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0
push 0x80
push 2
push 0
push 0
lea ecx, [ebp - 0x12c]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 4], 3
jne 0x10059ba7
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x18]
push 0
push edx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10059bd4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or edi, 0xffffffff
push esi
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x12c]
mov word [ebp - 0x28], 8
push eax
call fcn.1006e3e3
test eax, eax
mov dword [ebp - 0x20], eax
jne 0x10059c11
lea ecx, [ebp - 0x12c]
test ecx, ecx
je 0x10059c11
push 0x8007000e
call fcn.1006e336
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x28]
lea ecx, [ebp + 0xa]
push ecx
mov esi, dword [ebp + 0xc]
sub esp, 0x10
mov byte [ebp - 4], 4
mov ecx, esp
mov edx, dword [esi]
push esi
mov dword [ecx], ebx
mov ebx, dword [ebp - 0x24]
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [ecx + 0xc], eax
call dword [edx + 0xe8]
test eax, eax
jge 0x10059c4e
push 0x10085f58
push esi
push eax
call fcn.1006e344
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
test eax, eax
jge 0x10059c66
push eax
call fcn.1006e336
lea edx, [ebp - 0x12c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp word [ebp + 0xa], di
je 0x10059c8c
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret