Function at 0x4ae920
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb4
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
movsx eax, word [esi + 0xaa]
dec eax
cmp eax, 3
ja case.default.0x4ae949
jmp dword [eax*4 + 0x4aeed8]
mov edi, str.RGBA
jmp 0x4ae971
mov edi, str.ARGB
jmp 0x4ae971
mov edi, 0x5d90a4
jmp 0x4ae971
mov edi, str.ABGR
jmp 0x4ae971
mov edi, 0x5d4c60
lea eax, [ebp - 0xa8]
push eax
call fcn.00458dd0
lea ecx, [ebp - 0x84]
add esp, 4
sub ecx, edi
jmp 0x4ae990
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + edi - 1], al
test al, al
jne 0x4ae990
movzx eax, word [esi + 0x24]
cmp ax, 1
je 0x4aeab5
cmp ax, 2
je 0x4aeab5
cmp ax, 4
jne 0x4ae9fc
mov eax, dword [esi + 0x2c]
mov ecx, 8
mov dword [ebp - 0x90], eax
movzx eax, word [esi + 0xaa]
mov dword [ebp - 0x9c], 0x80001
cmp ax, 1
je 0x4ae9eb
cmp ax, 3
mov eax, 0x100
jne 0x4ae9f0
mov eax, 0x200
mov word [ebp - 0x8a], cx
jmp 0x4aeaca
cmp word [esi + 0xa8], 0
movzx ecx, word [esi + 0xaa]
jne 0x4aea53
mov eax, 1
mov word [ebp - 0x9c], ax
cmp cx, 2
je 0x4aea3f
cmp cx, 3
je 0x4aea3f
cmp cx, 4
je 0x4aea3f
mov eax, 0x18
mov word [ebp - 0x9a], ax
mov eax, dword [esi + 0x2c]
lea eax, [eax + eax*2]
jmp 0x4aea85
mov eax, 0x20
mov word [ebp - 0x9a], ax
mov eax, dword [esi + 0x2c]
shl eax, 2
jmp 0x4aea85
cmp cx, 2
je 0x4aea6a
cmp cx, 3
je 0x4aea6a
mov eax, 3
cmp cx, 4
jne 0x4aea6f
mov eax, 4
mov word [ebp - 0x9c], ax
mov eax, 8
mov word [ebp - 0x9a], ax
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0x90], eax
cmp cx, 1
je 0x4aeaa9
cmp cx, 3
je 0x4aeaa9
cmp cx, 4
jne 0x4aeac8
mov dword [ebp - 0xa8], 0x10
jmp 0x4aeac8
mov dword [ebp - 0xa8], 8
jmp 0x4aeac8
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0x9c], 0x80001
mov dword [ebp - 0x90], eax
xor eax, eax
mov word [ebp - 0x8c], ax
lea eax, [ebp - 0xa8]
push eax
push esi
call fcn.00457000
movzx eax, ax
add esp, 8
mov dword [ebp - 0xac], eax
test ax, ax
jne 0x4aecfa
movzx eax, word [esi + 0x24]
cmp ax, 1
je 0x4aed50
cmp ax, 2
je 0x4aed50
cmp ax, 4
jne 0x4aed0b
xor eax, eax
mov dword [ebp - 0xb0], eax
cmp dword [esi + 0x30], eax
jle 0x4aece8
push 1
push eax
push esi
call fcn.00459620
add esp, 0xc
cmp word [esi + 0xa8], 0
jne 0x4aebe9
xor edi, edi
mov dword [ebp - 0xb4], edi
cmp dword [esi + 0x2c], edi
jle 0x4aecd2
movzx eax, word [esi + 0xaa]
cmp ax, 3
je 0x4aeb64
cmp ax, 4
jne 0x4aeb70
push dword [ebx]
push 0
call fcn.005958b3
add esp, 8
mov eax, dword [ebp - 0xa0]
push dword [ebx]
movzx eax, byte [eax + edi]
lea edi, [eax + eax*2]
mov eax, dword [ebp - 0x88]
movzx eax, byte [edi + eax]
push eax
call fcn.005958b3
mov eax, dword [ebp - 0x88]
push dword [ebx]
movzx eax, byte [edi + eax + 1]
push eax
call fcn.005958b3
mov eax, dword [ebp - 0x88]
push dword [ebx]
movzx eax, byte [edi + eax + 2]
push eax
call fcn.005958b3
add esp, 0x18
cmp word [esi + 0xaa], 2
jne 0x4aebce
push dword [ebx]
push 0
call fcn.005958b3
add esp, 8
mov edi, dword [ebp - 0xb4]
inc edi
mov dword [ebp - 0xb4], edi
cmp edi, dword [esi + 0x2c]
jl 0x4aeb51
jmp 0x4aecd2
movzx eax, word [esi + 0xaa]
cmp ax, 3
je 0x4aebfc
cmp ax, 4
jne 0x4aec15
xor edi, edi
cmp dword [esi + 0x2c], edi
jle 0x4aec15
push dword [ebx]
push 0
call fcn.005958b3
inc edi
add esp, 8
cmp edi, dword [esi + 0x2c]
jl 0x4aec03
xor edi, edi
cmp dword [esi + 0x2c], edi
jle 0x4aec48
lea esp, [esp]
mov eax, dword [ebp - 0xa0]
push dword [ebx]
movzx ecx, byte [eax + edi]
mov eax, dword [ebp - 0x88]
lea eax, [eax + ecx*2]
movzx eax, byte [ecx + eax]
push eax
call fcn.005958b3
inc edi
add esp, 8
cmp edi, dword [esi + 0x2c]
jl 0x4aec20
xor edi, edi
cmp dword [esi + 0x2c], edi
jle 0x4aec79
nop
mov eax, dword [ebp - 0xa0]
push dword [ebx]
movzx ecx, byte [eax + edi]
mov eax, dword [ebp - 0x88]
lea eax, [eax + ecx*2]
movzx eax, byte [ecx + eax + 1]
push eax
call fcn.005958b3
inc edi
add esp, 8
cmp edi, dword [esi + 0x2c]
jl 0x4aec50
xor edi, edi
cmp dword [esi + 0x2c], edi
jle 0x4aeca9
mov eax, dword [ebp - 0xa0]
push dword [ebx]
movzx ecx, byte [eax + edi]
mov eax, dword [ebp - 0x88]
lea eax, [eax + ecx*2]
movzx eax, byte [ecx + eax + 2]
push eax
call fcn.005958b3
inc edi
add esp, 8
cmp edi, dword [esi + 0x2c]
jl 0x4aec80
cmp word [esi + 0xaa], 2
jne 0x4aecd2
xor edi, edi
cmp dword [esi + 0x2c], edi
jle 0x4aecd2
lea ebx, [ebx]
push dword [ebx]
push 0
call fcn.005958b3
inc edi
add esp, 8
cmp edi, dword [esi + 0x2c]
jl 0x4aecc0
mov eax, dword [ebp - 0xb0]
inc eax
mov dword [ebp - 0xb0], eax
cmp eax, dword [esi + 0x30]
jl 0x4aeb26
mov edi, dword [ebp - 0xac]
push esi
call fcn.00454fa0
add esp, 4
mov ax, di
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret
xor edi, edi
cmp dword [esi + 0x30], edi
jle 0x4aece8
push 1
push edi
push esi
call fcn.00459620
push dword [ebx]
movsx eax, word [ebp - 0x9c]
push eax
push dword [ebp - 0x90]
push dword [ebp - 0xa0]
call fcn.0059628c
movsx ecx, word [ebp - 0x9c]
add esp, 0x1c
cmp eax, ecx
jne 0x4aeecd
inc edi
cmp edi, dword [esi + 0x30]
jl 0x4aed12
jmp 0x4aece8
xor eax, eax
mov dword [ebp - 0xb0], eax
cmp dword [esi + 0x30], eax
jle 0x4aece8
lea ecx, [ecx]
push 1
push eax
push esi
call fcn.00459620
add esp, 0xc
cmp word [esi + 0xa8], 0
jne 0x4aee09
xor edi, edi
cmp dword [esi + 0x2c], edi
jle 0x4aeeb2
jmp 0x4aed90
movzx eax, word [esi + 0xaa]
cmp ax, 3
je 0x4aeda3
cmp ax, 4
jne 0x4aedaf
push dword [ebx]
push 0
call fcn.005958b3
add esp, 8
mov eax, dword [ebp - 0xa0]
push dword [ebx]
movzx eax, byte [eax + edi]
push eax
call fcn.005958b3
mov eax, dword [ebp - 0xa0]
push dword [ebx]
movzx eax, byte [eax + edi]
push eax
call fcn.005958b3
mov eax, dword [ebp - 0xa0]
push dword [ebx]
movzx eax, byte [eax + edi]
push eax
call fcn.005958b3
add esp, 0x18
cmp word [esi + 0xaa], 2
jne 0x4aedfe
push dword [ebx]
push 0
call fcn.005958b3
add esp, 8
inc edi
cmp edi, dword [esi + 0x2c]
jl 0x4aed90
jmp 0x4aeeb2
movzx eax, word [esi + 0xaa]
cmp ax, 3
je 0x4aee1c
cmp ax, 4
jne 0x4aee35
xor edi, edi
cmp dword [esi + 0x2c], edi
jle 0x4aee35
push dword [ebx]
push 0
call fcn.005958b3
inc edi
add esp, 8
cmp edi, dword [esi + 0x2c]
jl 0x4aee23
push dword [ebx]
push 1
push dword [ebp - 0x90]
push dword [ebp - 0xa0]
call fcn.0059628c
add esp, 0x10
test eax, eax
je 0x4aeecd
push dword [ebx]
push 1
push dword [ebp - 0x90]
push dword [ebp - 0xa0]
call fcn.0059628c
add esp, 0x10
test eax, eax
je 0x4aeecd
push dword [ebx]
push 1
push dword [ebp - 0x90]
push dword [ebp - 0xa0]
call fcn.0059628c
add esp, 0x10
test eax, eax
je 0x4aeecd
cmp word [esi + 0xaa], 2
jne 0x4aeeb2
xor edi, edi
cmp dword [esi + 0x2c], edi
jle 0x4aeeb2
lea ebx, [ebx]
push dword [ebx]
push 0
call fcn.005958b3
inc edi
add esp, 8
cmp edi, dword [esi + 0x2c]
jl 0x4aeea0
mov eax, dword [ebp - 0xb0]
inc eax
mov dword [ebp - 0xb0], eax
cmp eax, dword [esi + 0x30]
jl 0x4aed60
jmp 0x4aece8
mov edi, 6
jmp 0x4aecee