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

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0xdc]
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0xa0], 0
mov eax, 1
lea edx, [ebp - 0x98]
lea ecx, [ebp - 0x80]
call fcn.25126f50
call fcn.25127cb0
push eax
test eax, eax
jne 0x2512c56d
cmp dword [0x251349b0], 0xffffffff
jne 0x2512c406
lea eax, [ebp - 0x60]
mov cl, 0
mov edx, 0x2a
call fcn.25122150
lea eax, [ebp - 0x60]
push eax
push 1
push 0x101
push 2
push dword [ebp - 8]
push dword [ebp - 4]
call dword [ebp + 8]
test ax, ax
je 0x2512c067
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, str.Twain.ProcessMemory.DSM_Entry
mov ax, 1
call fcn.2512d100
jmp 0x2512c56d
mov ax, word [ebp - 0x3a]
mov word [0x251349c0], ax
test ax, ax
jl 0x2512c0a4
test ax, ax
je 0x2512c089
sub ax, 1
je 0x2512c092
sub ax, 1
je 0x2512c09b
jmp 0x2512c0a4
mov dword [ebp - 0x20], 0x30
jmp 0x2512c0ab
mov dword [ebp - 0x20], 0x428
jmp 0x2512c0ab
mov dword [ebp - 0x20], 0x28
jmp 0x2512c0ab
mov dword [ebp - 0x20], 0x428
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x34]
call fcn.25127d30
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x20]
mov cl, 0
call fcn.25122150
mov eax, dword [ebp - 0x34]
mov dword [eax], 0x28
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x58]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x54]
mov dword [eax + 8], edx
mov eax, dword [ebp - 0x34]
mov word [eax + 0xc], 1
mov edx, dword [ebp - 0x34]
mov ax, word [ebp - 0x3e]
mov word [edx + 0xe], ax
mov eax, dword [ebp - 0x34]
mov dword [eax + 0x10], 0
movsx edx, word [ebp - 0x3e]
mov eax, dword [ebp - 0x58]
imul eax, edx
add eax, 0x1f
mov edx, eax
sar edx, 0x1f
and edx, 0x1f
add eax, edx
sar eax, 3
and eax, 0xfffffffc
mov edx, dword [ebp - 0x54]
imul edx, eax
mov eax, dword [ebp - 0x20]
lea eax, [edx + eax]
mov edx, dword [ebp - 0x34]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 0x34]
mov dword [eax + 0x18], 0
mov eax, dword [ebp - 0x34]
mov dword [eax + 0x1c], 0
mov ax, word [0x251349c0]
test ax, ax
jl 0x2512c22c
test ax, ax
je 0x2512c168
sub ax, 1
je 0x2512c1d2
sub ax, 1
je 0x2512c220
jmp 0x2512c22c
mov eax, dword [ebp - 0x34]
mov dword [eax + 0x20], 2
mov eax, dword [ebp - 0x34]
mov dword [eax + 0x24], 0
mov dword [ebp - 0x68], 0
sub dword [ebp - 0x68], 1
nop
add dword [ebp - 0x68], 1
mov ecx, dword [ebp - 0x68]
imul eax, ecx, 0xff
mov edx, dword [ebp - 0x34]
mov byte [edx + ecx*4 + 0x2a], al
mov ecx, dword [ebp - 0x68]
imul eax, ecx, 0xff
mov edx, dword [ebp - 0x34]
mov byte [edx + ecx*4 + 0x29], al
mov ecx, dword [ebp - 0x68]
imul eax, ecx, 0xff
mov edx, dword [ebp - 0x34]
mov byte [edx + ecx*4 + 0x28], al
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x68]
mov byte [edx + eax*4 + 0x2b], 0
cmp dword [ebp - 0x68], 1
jl 0x2512c188
jmp 0x2512c27a
mov eax, dword [ebp - 0x34]
mov dword [eax + 0x20], 0x100
mov dword [ebp - 0x68], 0
sub dword [ebp - 0x68], 1
nop
add dword [ebp - 0x68], 1
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x68]
mov byte [ecx + edx*4 + 0x2a], dl
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x68]
mov byte [ecx + edx*4 + 0x29], dl
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x68]
mov byte [ecx + edx*4 + 0x28], dl
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x68]
mov byte [eax + edx*4 + 0x2b], 0
cmp dword [ebp - 0x68], 0xff
jl 0x2512c1e8
jmp 0x2512c27a
mov eax, dword [ebp - 0x34]
mov dword [eax + 0x20], 0
jmp 0x2512c27a
mov eax, dword [ebp - 0x34]
mov dword [eax + 0x20], 0x100
mov dword [ebp - 0x68], 0
sub dword [ebp - 0x68], 1
lea esi, [esi]
add dword [ebp - 0x68], 1
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x68]
mov byte [ecx + edx*4 + 0x2a], dl
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x68]
mov byte [ecx + edx*4 + 0x29], dl
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x68]
mov byte [ecx + edx*4 + 0x28], dl
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x68]
mov byte [eax + edx*4 + 0x2b], 0
cmp dword [ebp - 0x68], 0xff
jl 0x2512c244
mov eax, 0x2513ab10
mov cl, 0
mov edx, 0x20a
call fcn.25122150
mov eax, 0x2513ab10
push eax
push 0x104
call sub.kernel32.dll_GetTempPathW
lea eax, [ebp - 0xa4]
call fcn.25122560
push 0
call sub.kernel32.dll_GetTickCount
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb4], 0
fild qword [ebp - 0xb8]
lea esp, [esp - 4]
fstp dword [esp]
lea eax, [ebp - 0xa8]
call fcn.2512d290
mov edx, dword [ebp - 0xa8]
mov ecx, 0x25137460
lea eax, [ebp - 0xa4]
call fcn.25124d00
mov eax, dword [ebp - 0xa4]
lea edx, [ebp - 0xa0]
call fcn.251255b0
mov eax, dword [ebp - 0xa0]
test eax, eax
jne 0x2512c311
mov eax, 0x2513a2f0
push eax
mov eax, 0x2513ab10
push eax
call sub.kernel32.dll_lstrcatW
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0xc0000000
mov eax, 0x2513ab10
push eax
call sub.kernel32.dll_CreateFileW
mov dword [0x251349b0], eax
cmp eax, 0xffffffff
jne 0x2512c362
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, str.Twain.ProcessMemory.CreateFileW
mov ax, 1
call fcn.2512d100
jmp 0x2512c56d
lea eax, [ebp - 0x30]
mov cl, 0
mov edx, 0xe
call fcn.25122150
mov word [ebp - 0x30], 0x4d42
mov dword [ebp - 0x2e], 0xe
mov word [ebp - 0x2a], 0
mov word [ebp - 0x28], 0
mov eax, dword [ebp - 0x20]
add eax, 0xe
mov dword [ebp - 0x26], eax
push 0
lea eax, [ebp - 0x14]
push eax
push 0xe
lea eax, [ebp - 0x30]
push eax
push dword [0x251349b0]
call sub.kernel32.dll_WriteFile
test eax, eax
jne 0x2512c3cc
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, 0x25137614
mov ax, 1
call fcn.2512d100
jmp 0x2512c56d
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
push eax
push dword [0x251349b0]
call sub.kernel32.dll_WriteFile
test eax, eax
jne 0x2512c406
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, 0x25137680
mov ax, 1
call fcn.2512d100
jmp 0x2512c56d
cmp dword [ebp - 0xc], 0
je 0x2512c539
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x16]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x22]
mov dword [ebp - 0x64], eax
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x6c]
call fcn.25127d30
mov eax, 1
lea edx, [ebp - 0xdc]
lea ecx, [ebp - 0xc4]
call fcn.25126f50
call fcn.25127cb0
push eax
test eax, eax
jne 0x2512c518
jmp 0x2512c50e
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 2]
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0x18]
jbe 0x2512c46c
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x1c]
call fcn.25122110
cmp word [0x251349c0], 2
jne 0x2512c4c6
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x70], eax
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x68], 1
cmp edx, dword [ebp - 0x68]
jl 0x2512c4c6
sub dword [ebp - 0x68], 1
mov esi, esi
add dword [ebp - 0x68], 1
mov eax, dword [ebp - 0x70]
mov al, byte [eax + 2]
mov byte [ebp - 0x74], al
mov eax, dword [ebp - 0x70]
mov cl, byte [eax]
mov byte [eax + 2], cl
mov eax, dword [ebp - 0x70]
mov cl, byte [ebp - 0x74]
mov byte [eax], cl
add dword [ebp - 0x70], 3
cmp edx, dword [ebp - 0x68]
jg 0x2512c4a0
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x6c]
push eax
push dword [0x251349b0]
call sub.kernel32.dll_WriteFile
test eax, eax
jne 0x2512c4fd
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, 0x251376e0
mov ax, 1
call fcn.2512d100
jmp 0x2512c534
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
sub eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x64], eax
cmp dword [ebp - 0x18], 0
ja 0x2512c458
call fcn.251271d0
mov eax, dword [ebp - 0x6c]
call fcn.25127d60
pop eax
test eax, eax
je 0x2512c539
cmp eax, 2
je 0x2512c56d
call fcn.25127300
pop eax
push 2
jmp 0x2512c518
cmp dword [ebp + 0xc], 6
jne 0x2512c56d
push dword [0x251349b0]
call sub.kernel32.dll_CloseHandle
mov dword [0x251349b0], 0xffffffff
mov eax, 0x2513ab10
call fcn.2512bbe0
test al, al
jne 0x2512c56d
mov eax, 0x2513ab10
push eax
call sub.kernel32.dll_DeleteFileW
call fcn.251271d0
lea eax, [ebp - 0xa8]
call fcn.25122560
lea eax, [ebp - 0xa4]
call fcn.25122560
lea eax, [ebp - 0xa0]
call fcn.25125540
pop eax
test eax, eax
je 0x2512c59d
call fcn.25127300
leave
ret 8