Function at 0x6d535acf
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x464
push edi
xor edi, edi
push edi
push 4
lea eax, [ebp - 0x18]
push eax
push 0x14
push dword [ebp + 8]
call dword [0x6d584000]
test eax, eax
jge 0x6d535af8
xor eax, eax
jmp 0x6d535d84
mov eax, dword [ebp - 0x18]
push esi
shl eax, 5
push eax
call fcn.6d53457d
mov esi, eax
cmp esi, edi
mov dword [ebp - 0x1c], esi
jne 0x6d535b15
xor eax, eax
jmp 0x6d535d83
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x18], edi
push ebx
mov ebx, dword [eax + 0x94]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
jbe 0x6d535cfc
cmp dword [ebp - 0xc], 0x1000000
jae 0x6d535cfc
push 2
push 0
push 0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
push dword [ebp - 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x6d535cec
inc dword [ebp - 0x14]
push 0
push 0x38
lea eax, [ebp - 0x64]
push eax
push 0
push dword [ebp - 0x10]
call dword [0x6d583ff8]
test eax, eax
jl 0x6d535ce3
push 0
push 0x400
lea eax, [ebp - 0x464]
push eax
push 2
push dword [ebp - 0x10]
call dword [0x6d583ff8]
test eax, eax
jl 0x6d535ce3
movzx eax, word [ebp - 0x464]
mov ecx, dword [ebp - 0x460]
mov dword [ebp - 8], eax
shr eax, 1
and word [ecx + eax*2], 0
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
mov dword [esi + 8], ebx
call edi
test eax, eax
je 0x6d535d6d
cmp dword [ebp - 4], 4
jne 0x6d535d6d
add dword [ebp - 8], 2
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push dword [ebp - 0x460]
push dword [ebp + 0xc]
call edi
test eax, eax
je 0x6d535d6d
mov eax, dword [ebp - 8]
cmp dword [ebp - 4], eax
jne 0x6d535d6d
push 0x6d513b48
push dword [ebp - 0x460]
lea ebx, [ebx + eax + 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x6d535cbb
push 0
push 0x400
lea eax, [ebp - 0x464]
push eax
push 1
push dword [ebp - 0x10]
call dword [0x6d583ff8]
test eax, eax
jl 0x6d535cbb
mov ecx, dword [ebp - 0x460]
test ecx, ecx
je 0x6d535cbb
movzx eax, word [ebp - 0x464]
mov dword [ebp - 8], eax
shr eax, 1
and word [ecx + eax*2], 0
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
mov dword [esi + 0xc], ebx
call edi
test eax, eax
je 0x6d535d6d
cmp dword [ebp - 4], 4
jne 0x6d535d6d
add dword [ebp - 8], 2
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push dword [ebp - 0x460]
push dword [ebp + 0xc]
call edi
test eax, eax
je 0x6d535d6d
mov eax, dword [ebp - 8]
cmp dword [ebp - 4], eax
jne 0x6d535d6d
lea ebx, [ebx + eax + 4]
jmp 0x6d535cbf
and dword [esi + 0xc], 0
and dword [esi + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esi], eax
mov eax, dword [ebp - 0x64]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x60]
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 0x5c]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x58]
mov dword [esi + 0x1c], eax
add esi, 0x20
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
add dword [ebp - 0xc], 4
cmp eax, dword [ebp - 0x18]
jb 0x6d535b34
sub esi, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x10]
and dword [ebp - 0x20], 0
push 0x10
pop eax
sar esi, 5
mov dword [ebp - 0x24], esi
shl esi, 5
add esi, eax
push 0
mov dword [ecx + 0x94], ebx
mov dword [ecx + 0x98], esi
lea ecx, [ebp - 4]
push ecx
push eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x28], 0x20
call edi
test eax, eax
je 0x6d535d76
cmp dword [ebp - 4], 0x10
jne 0x6d535d76
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x24]
shl eax, 5
push eax
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
call edi
test eax, eax
je 0x6d535d76
mov eax, dword [ebp - 0x24]
shl eax, 5
cmp dword [ebp - 4], eax
jne 0x6d535d76
xor esi, esi
inc esi
jmp 0x6d535d78
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
push dword [ebp - 0x1c]
call fcn.6d5340e5
mov eax, esi
pop ebx
pop esi
pop edi
leave
ret 0xc