Function at 0x6d533a55
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push 1
xor ebx, ebx
push ebx
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x6d533a7a
xor eax, eax
jmp 0x6d533c3b
push esi
mov esi, dword [ebp + 0x10]
push 0x10000
mov dword [esi + 0x5c], eax
call fcn.6d53457d
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x6d533a99
xor eax, eax
jmp 0x6d533c3a
push edi
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
lea eax, [ebp - 4]
push eax
push 0x10
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x6d533c2e
cmp dword [ebp - 4], 0x10
jne 0x6d533c2e
mov edi, dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
push 0x1c
lea eax, [ebp - 0x54]
push eax
push ebx
push dword [ebp + 8]
call edi
test eax, eax
je 0x6d533b5e
test byte [ebp - 0x3f], 1
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x54]
lea esi, [eax + ecx]
jne 0x6d533b4b
test byte [ebp - 0x40], 1
jne 0x6d533b4b
test dword [ebp - 0x44], 0x12000
jne 0x6d533b4b
cmp dword [ebp - 0x28], 0xffffffe
jne 0x6d533b12
cmp dword [ebp - 0x24], ebx
je 0x6d533c2e
add dword [ebp - 0x28], 1
push ebx
mov dword [ebp - 0x30], eax
adc dword [ebp - 0x24], ebx
lea eax, [ebp - 4]
push eax
push 0x10
lea eax, [ebp - 0x38]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x6d533c2e
cmp dword [ebp - 4], 0x10
jne 0x6d533c2e
push 0x1c
lea eax, [ebp - 0x54]
push eax
push esi
push dword [ebp + 8]
call edi
test eax, eax
jne 0x6d533ae2
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp - 0x28]
mov ecx, dword [esi + 0x5c]
shl eax, 4
add dword [esi + 0x60], eax
mov eax, dword [esi + 0x60]
xor edx, edx
xor esi, esi
add ecx, eax
push 0x1c
lea eax, [ebp - 0x54]
adc edx, esi
push eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], edx
push ebx
jmp 0x6d533c02
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x48]
add ecx, eax
test byte [ebp - 0x3f], 1
mov dword [ebp - 0x18], ecx
jne 0x6d533bf9
test byte [ebp - 0x40], 1
jne 0x6d533bf9
test dword [ebp - 0x44], 0x12000
jne 0x6d533bf9
cmp dword [ebp - 0x48], ebx
mov dword [ebp - 8], eax
jbe 0x6d533bf9
mov esi, 0x10000
cmp dword [ebp - 0x48], esi
ja 0x6d533bb9
mov esi, dword [ebp - 0x48]
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x6d533c2e
cmp dword [ebp - 0x14], esi
jne 0x6d533c2e
push ebx
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp - 0xc]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x6d533c2e
cmp dword [ebp - 4], esi
jne 0x6d533c2e
add dword [ebp - 8], esi
sub dword [ebp - 0x48], esi
jne 0x6d533bac
push 0x1c
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x18]
push dword [ebp + 8]
call edi
test eax, eax
jne 0x6d533b84
push 0x10
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp + 0x10]
push dword [eax + 0x5c]
push dword [ebp + 0xc]
call fcn.6d5321ca
test eax, eax
je 0x6d533c2e
mov dword [ebp - 0x10], 1
push dword [ebp - 0xc]
call fcn.6d5340e5
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret 0xc