Function at 0x30004950
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x30217ec0
push 0x30160f00
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x3021be88]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov ebx, edx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x20], ecx
xor edi, edi
mov dword [ebp - 0x3c], edi
xor esi, esi
xor eax, eax
mov dword [ebp - 0x1c], eax
pushfd
pop dword [ebp - 0x30]
mov eax, dword fs:[0x18]
test eax, eax
jne 0x300049b5
mov dword [ebp - 0x24], 0xffffffff
mov dword [ebp - 0x28], 0xffffffff
jmp 0x300049c4
mov ecx, dword [eax + 0x34]
mov dword [ebp - 0x24], ecx
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x28], eax
push ebx
push 8
push dword [0x30272510]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x2c], eax
mov edx, dword fs:[0x18]
test edx, edx
je 0x300049f9
mov ecx, dword [ebp - 0x24]
mov dword [edx + 0x34], ecx
mov ecx, dword [ebp - 0x28]
mov dword [edx + 0xbf4], ecx
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x300049f9
push ecx
popfd
test eax, eax
jne 0x30004a10
push ebx
push str.DumpMemory:_Failed_to_allocate_0x_x_bytes_for_buffer_copy._n
call fcn.30009b40
add esp, 8
jmp 0x30004ad9
mov dword [ebp - 4], esi
push ebx
push dword [ebp - 0x20]
push eax
call fcn.301619b0
add esp, 0xc
mov dword [ebp - 4], 0xfffffffe
call fcn.300033c0
mov esi, eax
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x30004a78
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x30004a69
push esi
push str.DumpMemory:_Payload_name_exists_already:__s
call fcn.30009b40
add esp, 8
jmp 0x30004ad9
push str.DumpMemory:_Could_not_create_Payload
call fcn.30009b60
add esp, 4
jmp 0x30004ad9
mov dword [ebp - 0x34], 0
push 0
lea eax, [ebp - 0x34]
push eax
push ebx
push dword [ebp - 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x30004aa3
push str.DumpMemory:_WriteFile_error_on_Payload
call fcn.30009b60
add esp, 4
jmp 0x30004ad9
mov dword [ebp - 0x1c], 1
jmp 0x30004ad9
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x30004b3f
pushfd
pop dword [ebp - 0x44]
mov ecx, dword fs:[0x18]
test ecx, ecx
jne 0x30004aff
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x28], 0xffffffff
jmp 0x30004b0e
mov edx, dword [ecx + 0x34]
mov dword [ebp - 0x2c], edx
mov ecx, dword [ecx + 0xbf4]
mov dword [ebp - 0x28], ecx
push eax
push 0
push dword [0x30272510]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword fs:[0x18]
test eax, eax
je 0x30004b3f
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x34], ecx
mov ecx, dword [ebp - 0x28]
mov dword [eax + 0xbf4], ecx
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x30004b3f
push eax
popfd
test edi, edi
je 0x30004b4f
cmp edi, 0xffffffff
je 0x30004b4f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], 0
je 0x30004b7f
inc dword [0x3027399c]
mov eax, dword [0x302739d0]
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ebx
mov ecx, esi
call fcn.30009c60
push ebx
push esi
push str.DumpMemory:_Payload_successfully_created:__s__size__d_bytes_
call fcn.30009b40
add esp, 0xc
test esi, esi
je 0x30004bd3
pushfd
pop edi
mov eax, dword fs:[0x18]
test eax, eax
jne 0x30004b9b
or ebx, 0xffffffff
mov dword [ebp - 0x2c], 0xffffffff
jmp 0x30004ba7
mov ebx, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x2c], eax
push esi
push 0
push dword [0x30272510]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword fs:[0x18]
test ecx, ecx
je 0x30004bd3
mov dword [ecx + 0x34], ebx
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 0xbf4], edx
test edi, edi
je 0x30004bd3
push edi
popfd
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret