Function at 0x3001f4ae
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push esi
push 1
push 0
push 0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x3001f4d5
xor eax, eax
jmp 0x3001f740
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 0x58], edx
push 0x10000
call fcn.3001ff69
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x3001f4f8
xor eax, eax
jmp 0x3001f740
mov dword [ebp - 0x3c], 0
push 0x10
push 0
lea eax, [ebp - 0x14]
push eax
call fcn.30028330
add esp, 0xc
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0x10
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x3001f734
cmp dword [ebp - 0x18], 0x10
je 0x3001f538
jmp 0x3001f734
mov dword [ebp - 4], 0
push 0x1c
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualQueryEx]
test eax, eax
jne 0x3001f55c
jmp 0x3001f601
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x2c]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x24]
and edx, 0x100
test edx, edx
jne 0x3001f53f
mov eax, dword [ebp - 0x24]
and eax, 1
test eax, eax
jne 0x3001f53f
mov ecx, dword [ebp - 0x28]
and ecx, 0x10000
test ecx, ecx
jne 0x3001f53f
mov edx, dword [ebp - 0x28]
and edx, 0x2000
test edx, edx
je 0x3001f598
jmp 0x3001f53f
cmp dword [ebp - 0x14], 0xffffffe
jne 0x3001f5ac
cmp dword [ebp - 0x10], 0
jne 0x3001f5ac
jmp 0x3001f734
mov eax, dword [ebp - 0x14]
add eax, 1
mov ecx, dword [ebp - 0x10]
adc ecx, 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x38]
xor eax, eax
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x2c]
xor edx, edx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], edx
push 0
lea eax, [ebp - 0x18]
push eax
push 0x10
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x3001f734
cmp dword [ebp - 0x18], 0x10
je 0x3001f53f
jmp 0x3001f734
mov eax, dword [ebp - 0x14]
shl eax, 4
mov ecx, dword [ebp + 0x10]
add eax, dword [ecx + 0x5c]
mov edx, dword [ebp + 0x10]
mov dword [edx + 0x5c], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x58]
xor edx, edx
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x5c]
xor esi, esi
add ecx, eax
adc edx, esi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], 0
push 0x1c
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualQueryEx]
test eax, eax
jne 0x3001f651
jmp 0x3001f711
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x2c]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x24]
and edx, 0x100
test edx, edx
jne 0x3001f634
mov eax, dword [ebp - 0x24]
and eax, 1
test eax, eax
jne 0x3001f634
mov ecx, dword [ebp - 0x28]
and ecx, 0x10000
test ecx, ecx
jne 0x3001f634
mov edx, dword [ebp - 0x28]
and edx, 0x2000
test edx, edx
je 0x3001f68d
jmp 0x3001f634
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x2c], 0
jbe 0x3001f634
cmp dword [ebp - 0x2c], 0x10000
jbe 0x3001f6ab
mov dword [ebp - 0x54], 0x10000
jmp 0x3001f6b1
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x54], ecx
lea edx, [ebp - 0x50]
push edx
mov eax, dword [ebp - 0x54]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadProcessMemory]
test eax, eax
je 0x3001f734
mov ecx, dword [ebp - 0x50]
cmp ecx, dword [ebp - 0x54]
jne 0x3001f734
push 0
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x54]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x3001f734
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x54]
je 0x3001f6fd
jmp 0x3001f734
mov ecx, dword [ebp - 0x58]
add ecx, dword [ebp - 0x54]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x2c]
sub edx, dword [ebp - 0x54]
mov dword [ebp - 0x2c], edx
jmp 0x3001f693
push 0x10
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0x58]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.3001c756
test eax, eax
jne 0x3001f72d
jmp 0x3001f734
mov dword [ebp - 0x3c], 1
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.3001ff83
mov eax, dword [ebp - 0x3c]
pop esi
mov esp, ebp
pop ebp
ret 0xc