Function at 0x6d169ac0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov edx, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
mov eax, dword [esp + 0x78]
mov edi, dword [esp + 0x7c]
test edx, edx
je 0x6d169b30
cmp eax, 0x20
je 0x6d169ce0
cmp eax, 0x30
je 0x6d169db8
mov edx, eax
lea esi, [esp + 0x30]
movzx eax, ax
shl edx, 0x10
or eax, edx
mov edx, esi
mov dword [edx], eax
lea ecx, [esp + 0x50]
add edx, 8
mov dword [edx - 4], eax
cmp edx, ecx
jne 0x6d169afd
mov ebp, edi
cmp edi, 0xf
jg 0x6d169b6a
test edi, edi
jg 0x6d169ddf
mov dword [esp + 0x14], 0
jmp 0x6d169c17
cmp eax, 0x20
je 0x6d169cf8
cmp eax, 0x30
je 0x6d169d9c
movzx eax, al
mov ebp, edi
lea esi, [esp + 0x20]
imul eax, eax, 0x1010101
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
cmp edi, 0xf
jle 0x6d169d08
mov dword [esp + 0x14], 0
mov edi, ebp
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x6d169bc8
mov eax, dword [esp + 0x74]
test eax, eax
je 0x6d169c28
xor ebp, ebp
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp + 4], eax
movzx eax, word [esi + ebp*2]
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
cmp ax, 0xffff
je 0x6d169cd0
add ebp, 1
cmp ebp, 0x10
jne 0x6d169b90
sub edi, 0x10
add dword [esp + 0x14], 0x10
cmp edi, 0xf
jle 0x6d169c0d
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x6d169b87
mov eax, dword [ebx + 8]
mov edx, 0x10
mov ecx, dword [ebx + 4]
cmp eax, edx
cmova eax, edx
cmp eax, 4
jae 0x6d169c78
test eax, eax
je 0x6d169bf2
movzx edx, byte [esi]
mov byte [ecx], dl
test al, 2
jne 0x6d169dd0
sub edi, 0x10
add dword [ebx + 4], eax
sub dword [ebx + 8], eax
add dword [ebx + 0xc], 0x10
add dword [esp + 0x14], 0x10
cmp edi, 0xf
jg 0x6d169b74
mov ebp, edi
test ebp, ebp
jne 0x6d169d4f
mov eax, dword [esp + 0x14]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [esp + 0x14]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp + 8], 0x10
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add ebp, eax
cmp eax, 0x10
jne 0x6d169e6a
sub edi, 0x10
cmp edi, 0xf
jle 0x6d169d91
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x6d169c30
mov dword [esp + 0x14], ebp
jmp 0x6d169bc8
mov edx, dword [esi]
mov ebp, esi
mov dword [ecx], edx
mov edx, dword [esi + eax - 4]
mov dword [ecx + eax - 4], edx
lea edx, [ecx + 4]
and edx, 0xfffffffc
sub ecx, edx
sub ebp, ecx
add ecx, eax
and ecx, 0xfffffffc
cmp ecx, 4
jb 0x6d169bf2
mov dword [esp + 0x1c], eax
and ecx, 0xfffffffc
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov eax, dword [ebp + ecx]
mov dword [edx + ecx], eax
mov eax, dword [esp + 0x18]
add ecx, 4
cmp ecx, eax
jb 0x6d169cab
mov eax, dword [esp + 0x1c]
jmp 0x6d169bf2
add dword [esp + 0x14], ebp
mov eax, dword [esp + 0x14]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, edi
mov esi, 0x6d181f60
cmp edi, 0xf
jg 0x6d169b6a
jmp 0x6d169b14
mov ebp, edi
mov esi, 0x6d181f90
cmp edi, 0xf
jg 0x6d169b6a
test edi, edi
jle 0x6d169b1c
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x14], 0
test eax, eax
je 0x6d169df2
mov eax, dword [ebx]
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov dword [esp], esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ebp, eax
add dword [esp + 0x14], ebp
mov eax, dword [esp + 0x14]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebx + 0x10]
mov edi, ebp
test ecx, ecx
je 0x6d169df2
mov edx, dword [esp + 0x74]
test edx, edx
je 0x6d169d23
xor ebp, ebp
lea esi, cs:[esi]
nop
mov eax, dword [ebx]
mov dword [esp + 4], eax
movzx eax, word [esi + ebp*2]
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputwc
cmp ax, 0xffff
je 0x6d169d3f
add ebp, 1
cmp ebp, edi
jne 0x6d169d70
jmp 0x6d169d3f
mov dword [esp + 0x14], ebp
mov ebp, edi
jmp 0x6d169c0f
mov ebp, edi
mov esi, 0x6d181f80
cmp edi, 0xf
jg 0x6d169b6a
jmp 0x6d169d08
mov ebp, edi
mov esi, str.0000000000000000
cmp edi, 0xf
jg 0x6d169b6a
jmp 0x6d169b14
movzx edx, word [esi + eax - 2]
mov word [ecx + eax - 2], dx
jmp 0x6d169bf2
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x14], 0
test eax, eax
jne 0x6d169d64
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 4]
cmp edi, edx
cmovbe edx, edi
cmp edx, 4
jb 0x6d169e40
mov ecx, dword [esi]
mov dword [eax], ecx
mov ecx, dword [esi + edx - 4]
mov dword [eax + edx - 4], ecx
lea ecx, [eax + 4]
and ecx, 0xfffffffc
sub eax, ecx
sub esi, eax
add eax, edx
and eax, 0xfffffffc
cmp eax, 4
jb 0x6d169e4e
mov dword [esp + 0x18], edx
and eax, 0xfffffffc
mov ebp, eax
xor eax, eax
mov edx, dword [esi + eax]
mov dword [ecx + eax], edx
add eax, 4
cmp eax, ebp
jb 0x6d169e2d
mov edx, dword [esp + 0x18]
jmp 0x6d169e4e
test edx, edx
je 0x6d169e4e
movzx ecx, byte [esi]
mov byte [eax], cl
test dl, 2
jne 0x6d169e5e
add dword [ebx + 4], edx
mov ebp, edi
sub dword [ebx + 8], edx
add dword [ebx + 0xc], edi
jmp 0x6d169d3f
movzx ecx, word [esi + edx - 2]
mov word [eax + edx - 2], cx
jmp 0x6d169e4e
mov dword [esp + 0x14], ebp
jmp 0x6d169c17