Function at 0x3001f666
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 0x3001f68d
xor eax, eax
jmp 0x3001f8f8
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 0x58], edx
push 0x10000
call fcn.30020121
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x3001f6b0
xor eax, eax
jmp 0x3001f8f8
mov dword [ebp - 0x3c], 0
push 0x10
push 0
lea eax, [ebp - 0x14]
push eax
call fcn.300284e0
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 0x3001f8ec
cmp dword [ebp - 0x18], 0x10
je 0x3001f6f0
jmp 0x3001f8ec
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 0x3001f714
jmp 0x3001f7b9
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 0x3001f6f7
mov eax, dword [ebp - 0x24]
and eax, 1
test eax, eax
jne 0x3001f6f7
mov ecx, dword [ebp - 0x28]
and ecx, 0x10000
test ecx, ecx
jne 0x3001f6f7
mov edx, dword [ebp - 0x28]
and edx, 0x2000
test edx, edx
je 0x3001f750
jmp 0x3001f6f7
cmp dword [ebp - 0x14], 0xffffffe
jne 0x3001f764
cmp dword [ebp - 0x10], 0
jne 0x3001f764
jmp 0x3001f8ec
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 0x3001f8ec
cmp dword [ebp - 0x18], 0x10
je 0x3001f6f7
jmp 0x3001f8ec
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 0x3001f809
jmp 0x3001f8c9
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 0x3001f7ec
mov eax, dword [ebp - 0x24]
and eax, 1
test eax, eax
jne 0x3001f7ec
mov ecx, dword [ebp - 0x28]
and ecx, 0x10000
test ecx, ecx
jne 0x3001f7ec
mov edx, dword [ebp - 0x28]
and edx, 0x2000
test edx, edx
je 0x3001f845
jmp 0x3001f7ec
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x2c], 0
jbe 0x3001f7ec
cmp dword [ebp - 0x2c], 0x10000
jbe 0x3001f863
mov dword [ebp - 0x54], 0x10000
jmp 0x3001f869
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 [0x30001148]
test eax, eax
je 0x3001f8ec
mov ecx, dword [ebp - 0x50]
cmp ecx, dword [ebp - 0x54]
jne 0x3001f8ec
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 0x3001f8ec
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x54]
je 0x3001f8b5
jmp 0x3001f8ec
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 0x3001f84b
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.3001c90e
test eax, eax
jne 0x3001f8e5
jmp 0x3001f8ec
mov dword [ebp - 0x3c], 1
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.3002013b
mov eax, dword [ebp - 0x3c]
pop esi
mov esp, ebp
pop ebp
ret 0xc