Function at 0x4ae690
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0xa8]
push edi
mov edi, dword [ebp + 0xc]
push eax
mov dword [ebp - 0xb4], ebx
call fcn.00458dd0
mov al, byte [0x5d9108]
add esp, 4
movq xmm0, qword [str.Raw_Grey]
mov byte [ebp - 0x7c], al
mov eax, 1
mov word [ebp - 0x9c], ax
movzx eax, word [edi + 0x24]
movq qword [ebp - 0x84], xmm0
cmp ax, 1
je 0x4ae72f
cmp ax, 2
je 0x4ae72f
cmp ax, 4
jne 0x4ae71b
mov eax, dword [edi + 0x2c]
mov ecx, 8
mov word [ebp - 0x9a], cx
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], 0x80100
jmp 0x4ae74d
mov eax, 0x18
mov word [ebp - 0x9a], ax
mov eax, dword [edi + 0x2c]
lea eax, [eax + eax*2]
jmp 0x4ae73e
mov eax, 8
mov word [ebp - 0x9a], ax
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x90], eax
xor eax, eax
mov word [ebp - 0x8c], ax
lea eax, [ebp - 0xa8]
push eax
push edi
call fcn.00457000
movzx eax, ax
add esp, 8
mov dword [ebp - 0xac], eax
test ax, ax
jne 0x4ae829
movzx eax, word [edi + 0x24]
push esi
cmp ax, 1
je 0x4ae8d2
cmp ax, 2
je 0x4ae8d2
cmp ax, 4
jne 0x4ae839
xor ebx, ebx
mov dword [ebp - 0xb0], ebx
cmp dword [edi + 0x30], ebx
jle 0x4ae816
nop
push 1
push ebx
push edi
call fcn.00459620
xor esi, esi
add esp, 0xc
cmp dword [edi + 0x2c], esi
jle 0x4ae80a
mov ebx, dword [ebp - 0xb4]
lea esp, [esp]
mov eax, dword [ebp - 0xa0]
push dword [ebx]
movzx ecx, byte [esi + eax]
mov eax, dword [ebp - 0x88]
lea eax, [eax + ecx*2]
add ecx, eax
movzx eax, byte [ecx + 1]
imul edx, eax, 0x96
movzx eax, byte [ecx + 2]
imul eax, eax, 0x1d
add edx, eax
movzx eax, byte [ecx]
imul eax, eax, 0x4d
add edx, eax
sar edx, 8
push edx
call fcn.005958b3
inc esi
add esp, 8
cmp esi, dword [edi + 0x2c]
jl 0x4ae7c0
mov ebx, dword [ebp - 0xb0]
inc ebx
mov dword [ebp - 0xb0], ebx
cmp ebx, dword [edi + 0x30]
jl 0x4ae7a0
mov esi, dword [ebp - 0xac]
push edi
call fcn.00454fa0
add esp, 4
mov ax, si
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0xb8], eax
cmp dword [edi + 0x30], eax
jle 0x4ae816
push 1
push eax
push edi
call fcn.00459620
xor esi, esi
mov dword [ebp - 0xb0], 0
add esp, 0xc
cmp dword [edi + 0x2c], esi
jle 0x4ae8b7
mov eax, dword [ebp - 0xa0]
lea esi, [esi + 3]
mov cl, byte [esi + eax - 2]
mov bl, byte [esi + eax - 3]
mov dl, byte [esi + eax - 1]
mov eax, dword [ebp - 0xb4]
push dword [eax]
movzx eax, cl
imul ecx, eax, 0x96
movzx eax, dl
imul eax, eax, 0x1d
add ecx, eax
movzx eax, bl
imul eax, eax, 0x4d
add ecx, eax
sar ecx, 8
push ecx
call fcn.005958b3
mov eax, dword [ebp - 0xb0]
add esp, 8
inc eax
mov dword [ebp - 0xb0], eax
cmp eax, dword [edi + 0x2c]
jl 0x4ae863
mov eax, dword [ebp - 0xb8]
inc eax
mov dword [ebp - 0xb8], eax
cmp eax, dword [edi + 0x30]
jl 0x4ae846
jmp 0x4ae816
xor esi, esi
cmp dword [edi + 0x30], esi
jle 0x4ae816
lea ecx, [ecx]
push 1
push esi
push edi
call fcn.00459620
push dword [ebx]
push 1
push dword [ebp - 0x90]
push dword [ebp - 0xa0]
call fcn.0059628c
add esp, 0x1c
test eax, eax
je 0x4ae910
inc esi
cmp esi, dword [edi + 0x30]
jl 0x4ae8e0
jmp 0x4ae816
mov esi, 6
jmp 0x4ae81c