Function at 0x30004840
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x30216df8
push 0x3015f8a0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x3021ae88]
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 0x300048a5
mov dword [ebp - 0x24], 0xffffffff
mov dword [ebp - 0x28], 0xffffffff
jmp 0x300048b4
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 [0x30271450]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x2c], eax
mov edx, dword fs:[0x18]
test edx, edx
je 0x300048e9
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 0x300048e9
push ecx
popfd
test eax, eax
jne 0x30004900
push ebx
push str.DumpMemory:_Failed_to_allocate_0x_x_bytes_for_buffer_copy._n
call fcn.30009b00
add esp, 8
jmp 0x300049c9
mov dword [ebp - 4], esi
push ebx
push dword [ebp - 0x20]
push eax
call fcn.30160350
add esp, 0xc
mov dword [ebp - 4], 0xfffffffe
call fcn.300034b0
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 0x30004968
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
jne 0x30004959
push esi
push str.DumpMemory:_Payload_name_exists_already:__s
call fcn.30009b00
add esp, 8
jmp 0x300049c9
push str.DumpMemory:_Could_not_create_Payload
call fcn.30009b20
add esp, 4
jmp 0x300049c9
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 0x30004993
push str.DumpMemory:_WriteFile_error_on_Payload
call fcn.30009b20
add esp, 4
jmp 0x300049c9
mov dword [ebp - 0x1c], 1
jmp 0x300049c9
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x30004a2f
pushfd
pop dword [ebp - 0x44]
mov ecx, dword fs:[0x18]
test ecx, ecx
jne 0x300049ef
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x28], 0xffffffff
jmp 0x300049fe
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 [0x30271450]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword fs:[0x18]
test eax, eax
je 0x30004a2f
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 0x30004a2f
push eax
popfd
test edi, edi
je 0x30004a3f
cmp edi, 0xffffffff
je 0x30004a3f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], 0
je 0x30004a6f
inc dword [0x3027289c]
mov eax, dword [0x302728d0]
mov ecx, dword [ebp - 0x20]
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ebx
mov ecx, esi
call fcn.30009c20
push ebx
push esi
push str.DumpMemory:_Payload_successfully_created:__s__size__d_bytes_
call fcn.30009b00
add esp, 0xc
test esi, esi
je 0x30004ac3
pushfd
pop edi
mov eax, dword fs:[0x18]
test eax, eax
jne 0x30004a8b
or ebx, 0xffffffff
mov dword [ebp - 0x2c], 0xffffffff
jmp 0x30004a97
mov ebx, dword [eax + 0x34]
mov eax, dword [eax + 0xbf4]
mov dword [ebp - 0x2c], eax
push esi
push 0
push dword [0x30271450]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword fs:[0x18]
test ecx, ecx
je 0x30004ac3
mov dword [ecx + 0x34], ebx
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 0xbf4], edx
test edi, edi
je 0x30004ac3
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