Function at 0x10012580
Capabilities:
Delete file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x82b4
call fcn.10037d10
mov eax, dword [0x100505e4]
xor eax, esp
mov dword [esp + 0x82b0], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x14]
xor ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edi
cmp edi, ebx
je 0x100125c8
call fcn.10015cf0
mov dword [edi], eax
mov dword [edi + 4], edx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call esi
mov ebx, eax
mov dword [esp + 0x28], ebx
cmp ebx, 0xffffffff
je 0x10012615
mov ecx, dword [esp + 0x20]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push ecx
call esi
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x1001262e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x82b0]
xor ecx, esp
call fcn.10024280
mov esp, ebp
pop ebp
ret 0x10
push 0x38
lea edx, [esp + 0x3c]
push 0
push edx
call fcn.1002a240
add esp, 0xc
push 0xffffffffffffffff
mov eax, str.1.2.3
lea ecx, [esp + 0x3c]
call fcn.1001edb0
add esp, 4
test eax, eax
je 0x1001268a
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x82b0]
xor ecx, esp
call fcn.10024280
mov esp, ebp
pop ebp
ret 0x10
push 0x3fff
lea edx, [esp + 0x2bd]
push 0
push edx
mov dword [esp + 0x24], 0
mov byte [esp + 0x2c4], 0
call fcn.1002a240
add esp, 0xc
push 0x3fff
lea eax, [esp + 0x42bd]
push 0
push eax
mov byte [esp + 0x42c4], 0
call fcn.1002a240
add esp, 0xc
lea ecx, [esp + 0x70]
push ecx
mov ecx, dword [ebp + 0x10]
mov byte [esp + 0x16], 0
mov byte [esp + 0x17], 1
call fcn.10014480
lea ecx, [esp + 0x70]
call fcn.10015580
push 0
lea edx, [esp + 0x1c]
push edx
push 0x4000
lea eax, [esp + 0x2c4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001287a
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1001287a
mov byte [esp + 0x13], 0
test edi, edi
je 0x10012734
mov ecx, dword [edi + 0x10]
cmp byte [ecx], 0
jne 0x1001287a
lea edx, [esp + 0x2b8]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], edx
lea eax, [esp + 0x42b8]
mov dword [esp + 0x44], eax
push 2
lea eax, [esp + 0x3c]
mov dword [esp + 0x4c], 0x4000
call fcn.1001f120
add esp, 4
lea edx, [esp + 0x42b8]
mov ecx, 0x4000
sub ecx, dword [esp + 0x48]
push edx
lea edx, [esp + 0x74]
call fcn.100158a0
test eax, eax
je 0x100128d8
mov esi, dword [esp + 0x294]
xor ebx, ebx
xor edi, edi
sub esi, dword [esp + 0x290]
je 0x100127e3
test esi, esi
ja 0x100127a3
call fcn.10024d29
mov eax, dword [esp + 0x290]
mov dword [esp + 0x24], eax
test esi, esi
je 0x100127e3
lea ecx, [esi + 2]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x100128ce
mov edx, dword [esp + 0x24]
push esi
push edx
push edi
mov ebx, 1
call fcn.1002b570
add esp, 0xc
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x28]
push eax
push esi
push edi
push ecx
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10012827
test ebx, ebx
je 0x10012817
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esp + 0x48], 0
jne 0x10012840
mov edi, dword [esp + 0x1c]
jmp 0x10012743
mov byte [esp + 0x12], 1
test ebx, ebx
je 0x10012840
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x10012853
mov edx, dword [esp + 0x18]
add dword [edi + 8], edx
adc dword [edi + 0xc], 0
mov ebx, dword [esp + 0x28]
push 0
lea eax, [esp + 0x1c]
push eax
push 0x4000
lea ecx, [esp + 0x2c4]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10012713
lea esi, [esp + 0x38]
call fcn.1001f900
xor esi, esi
cmp edi, esi
je 0x100128e2
mov edx, dword [edi + 0x10]
cmp byte [edx], 0
je 0x100128e2
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea esi, [esp + 0x70]
call fcn.10014570
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x82b0]
xor ecx, esp
call fcn.10024280
mov esp, ebp
pop ebp
ret 0x10
mov byte [esp + 0x12], 1
jmp 0x10012840
mov byte [esp + 0x12], 1
jmp 0x10012844
cmp byte [esp + 0x12], 0
jne 0x10012958
cmp byte [esp + 0x13], 0
jne 0x10012958
lea ecx, [esp + 0x70]
call fcn.10015680
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x70]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
call fcn.10014c10
test eax, eax
je 0x1001294a
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
push esi
lea edx, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
push edx
mov dword [esp + 0x3c], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001294a
cmp edi, esi
je 0x1001294f
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [edi + 8], eax
mov dword [edi + 0xc], ecx
jmp 0x1001294f
mov byte [esp + 0x12], 1
lea esi, [esp + 0x2c]
call fcn.10011d50
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
cmp byte [esp + 0x12], 0
je 0x10012979
mov eax, dword [esp + 0x20]
push eax
jmp 0x100128a6
lea esi, [esp + 0x70]
call fcn.10014570
mov ecx, dword [esp + 0x82bc]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.10024280
mov esp, ebp
pop ebp
ret 0x10