Function at 0x4a1ea0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe4
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0xe0]
push edi
mov edi, dword [ebp + 8]
push eax
call fcn.00458dd0
add esp, 4
lea edx, [ebp - 0xbc]
cmp word [esi + 0xac], 0
mov ecx, str.Pcx_Rle
mov eax, 0x5db754
cmove ecx, eax
sub edx, ecx
jmp 0x4a1ef0
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4a1ef0
movzx ecx, word [esi + 0x24]
mov ebx, 1
lea edx, [ebx + 7]
cmp cx, bx
je 0x4a1f24
cmp cx, 4
jne 0x4a1f1b
cmp word [esi + 0x34], 0x10
jle 0x4a1f24
mov word [ebp - 0xd2], dx
jmp 0x4a1f2b
mov word [ebp - 0xd2], bx
cmp cx, 4
jne 0x4a1f46
cmp word [esi + 0x34], 0x10
jg 0x4a1f46
mov eax, 4
mov word [ebp - 0xd4], ax
jmp 0x4a1f6d
cmp cx, 1
je 0x4a1f66
cmp cx, 2
je 0x4a1f66
cmp cx, 4
je 0x4a1f66
mov eax, 3
mov word [ebp - 0xd4], ax
jmp 0x4a1f6d
mov word [ebp - 0xd4], bx
mov eax, 0x7f0
mov dword [ebp - 0xe4], eax
cmp cx, ax
je 0x4a1fa0
cmp cx, 2
je 0x4a1fa0
cmp cx, 4
jne 0x4a1f90
cmp word [esi + 0x34], 0x10
jg 0x4a1fa0
mov eax, dword [esi + 0x2c]
add eax, 0xf
shr eax, 3
and eax, 0x1ffffffe
jmp 0x4a1fa3
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0xc8], eax
mov eax, 0x100
mov word [ebp - 0xc2], dx
xor edx, edx
cmp cx, word [ebp - 0xe4]
cmove eax, edx
mov word [ebp - 0xc4], ax
lea eax, [ebp - 0xe0]
push eax
push esi
call fcn.00457000
movzx eax, ax
add esp, 8
test ax, ax
jne 0x4a2192
push dword [edi]
push 0xa
call fcn.005958b3
push dword [edi]
push 5
call fcn.005958b3
push dword [edi]
xor eax, eax
cmp word [esi + 0xac], ax
setne al
push eax
call fcn.005958b3
push dword [edi]
movsx eax, word [ebp - 0xd2]
push eax
call fcn.005958b3
push edi
push 0
call fcn.0045d560
push edi
push 0
call fcn.0045d560
movzx eax, word [esi + 0x2c]
dec ax
movzx eax, ax
push edi
push eax
call fcn.0045d560
movzx eax, word [esi + 0x30]
dec ax
movzx eax, ax
push edi
push eax
call fcn.0045d560
movzx eax, word [esi + 0x36]
add esp, 0x40
push edi
push eax
call fcn.0045d560
movzx eax, word [esi + 0x38]
push edi
push eax
call fcn.0045d560
push 0x30
lea eax, [ebp - 0x3c]
push 0
push eax
call fcn.00595760
movsx ecx, word [ebp - 0xd4]
add esp, 0x1c
movsx eax, word [ebp - 0xd2]
imul ecx, eax
cmp ecx, 4
jg 0x4a20a0
shl ebx, cl
lea eax, [ebx + ebx*2]
push eax
push dword [ebp - 0xc0]
lea eax, [ebp - 0x3c]
push eax
call fcn.00592150
add esp, 0xc
push dword [edi]
lea eax, [ebp - 0x3c]
push 1
push 0x30
push eax
call fcn.0059628c
push dword [edi]
push 0
call fcn.005958b3
push dword [edi]
movsx eax, word [ebp - 0xd4]
push eax
call fcn.005958b3
push edi
push dword [ebp - 0xc8]
call fcn.0045d560
push edi
push 1
call fcn.0045d560
push edi
push 0
call fcn.0045d560
push edi
push 0
call fcn.0045d560
add esp, 0x40
lea eax, [ebp - 0x3c]
push 0x36
push 0
push eax
call fcn.00595760
push dword [edi]
lea eax, [ebp - 0x3c]
push 1
push 0x36
push eax
call fcn.0059628c
add esp, 0x1c
test eax, eax
jne 0x4a2116
lea ebx, [eax + 6]
jmp 0x4a2186
cmp word [esi + 0xac], 0
lea eax, [ebp - 0xe0]
push eax
movzx eax, word [esi + 0x30]
push eax
push esi
push edi
je 0x4a2135
call fcn.004a2270
jmp 0x4a213a
call fcn.004a2350
movzx ebx, ax
add esp, 0x10
test bx, bx
jne 0x4a2186
movzx eax, word [esi + 0x24]
cmp ax, 2
je 0x4a215c
cmp ax, 4
jne 0x4a2186
cmp word [esi + 0x34], 0x10
jle 0x4a2186
push dword [edi]
push 0xc
call fcn.005958b3
push dword [edi]
push 1
push 0x300
push dword [ebp - 0xc0]
call fcn.0059628c
add esp, 0x18
mov ecx, 6
test eax, eax
cmove ebx, ecx
push esi
call fcn.00454fa0
add esp, 4
mov ax, bx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret