Function at 0x4a16e0
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
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xa8]
push edi
mov edi, dword [ebp + 0xc]
push eax
mov dword [ebp - 0xac], esi
mov dword [ebp - 0xb4], edi
call fcn.00458dd0
add esp, 4
lea edx, [ebp - 0x84]
cmp word [edi + 0xac], 0
mov ecx, str.IFF_ILBM_Packbits
mov eax, str.IFF_ILBM
cmove ecx, eax
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4a1734
mov eax, dword [edi + 0x2c]
xor ecx, ecx
add eax, 0xf
mov word [ebp - 0xa4], cx
movzx ecx, word [edi + 0x24]
cdq
and edx, 7
add eax, edx
mov edx, 0x7f0
sar eax, 3
and eax, 0xfffffffe
mov dword [ebp - 0x90], eax
cmp cx, dx
jne 0x4a1791
xor ecx, ecx
mov dword [ebp - 0x9c], 0x180001
lea eax, [eax + eax*2]
mov word [ebp - 0x8c], cx
shl eax, 3
mov dword [ebp - 0x90], eax
jmp 0x4a17c0
mov eax, 1
mov word [ebp - 0x9a], ax
cmp cx, ax
je 0x4a17af
movsx eax, word [edi + 0x34]
push eax
call fcn.004553b0
add esp, 4
mov word [ebp - 0x9c], ax
mov dword [ebp - 0x8c], 0x80100
lea eax, [ebp - 0xa8]
push eax
push edi
call fcn.00457000
movzx ebx, ax
add esp, 8
test bx, bx
jne 0x4a1b38
push 0
push 0x464f524d
push esi
call fcn.004a1c00
push esi
call fcn.004a1c20
add esp, 0x10
test ax, ax
je 0x4a1816
push edi
call fcn.00454fa0
add esp, 4
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push 0x14
push 0x424d4844
push esi
call fcn.004a1c00
movzx eax, word [edi + 0xac]
push eax
mov eax, dword [ebp - 0x9c]
imul eax, dword [ebp - 0x9a]
push eax
movzx eax, word [edi + 0x30]
push eax
movzx eax, word [edi + 0x2c]
push eax
push esi
call fcn.004a1b50
add esp, 0x20
test ax, ax
jne 0x4a17f7
mov eax, 0x7f0
cmp word [edi + 0x24], ax
je 0x4a18a3
movzx ecx, byte [ebp - 0x9c]
mov ebx, 1
mov eax, ebx
shl eax, cl
lea eax, [eax + eax*2]
push eax
push 0x434d4150
push esi
call fcn.004a1c00
movzx ecx, byte [ebp - 0x9c]
mov eax, ebx
push dword [esi]
shl eax, cl
push ebx
lea eax, [eax + eax*2]
push eax
push dword [ebp - 0x88]
call fcn.0059628c
add esp, 0x1c
test eax, eax
je 0x4a17f7
push 4
push 0x43414d47
push esi
call fcn.004a1c00
push esi
call fcn.004a1be0
movzx ebx, ax
add esp, 0x10
mov dword [ebp - 0xb0], ebx
test bx, bx
jne 0x4a17f7
movsx eax, word [ebp - 0x9c]
imul eax, dword [edi + 0x30]
imul eax, dword [ebp - 0x90]
push eax
push 0x424f4459
push esi
call fcn.004a1c00
mov eax, 0x7f0
add esp, 0xc
cmp word [edi + 0x24], ax
jne 0x4a1974
push dword [ebp - 0x90]
call fcn.00593e38
mov dword [ebp - 0xb0], eax
add esp, 4
xor eax, eax
mov dword [ebp - 0xac], eax
cmp dword [edi + 0x30], eax
jle 0x4a1961
push 1
push eax
push edi
call fcn.00459620
push dword [ebp - 0xb0]
movzx eax, word [edi + 0xac]
push dword [ebp - 0xa0]
push eax
push dword [ebp - 0x90]
push dword [edi + 0x2c]
push esi
call fcn.004a15a0
movzx ebx, ax
add esp, 0x24
test bx, bx
jne 0x4a1961
mov eax, dword [ebp - 0xac]
inc eax
mov dword [ebp - 0xac], eax
cmp eax, dword [edi + 0x30]
jl 0x4a1918
push dword [ebp - 0xb0]
call fcn.00592c4b
add esp, 4
jmp 0x4a1a09
cmp word [edi + 0xac], 0
je 0x4a1a3e
xor eax, eax
mov dword [ebp - 0xb0], eax
cmp dword [edi + 0x30], eax
jle 0x4a1a09
nop
test bx, bx
jne 0x4a1a03
push 1
push eax
push edi
call fcn.00459620
xor eax, eax
add esp, 0xc
xor esi, esi
cmp ax, word [ebp - 0x9c]
jge 0x4a19f1
mov edi, dword [ebp - 0xac]
lea eax, [ebp - 0xb8]
mov ecx, esi
push eax
mov eax, dword [ebp - 0x90]
imul ecx, eax
push eax
add ecx, dword [ebp - 0xa0]
push ecx
push edi
call fcn.0051d8d0
movzx ebx, ax
add esp, 0x10
test bx, bx
jne 0x4a19eb
movsx eax, word [ebp - 0x9c]
inc esi
cmp esi, eax
jl 0x4a19b4
mov edi, dword [ebp - 0xb4]
mov eax, dword [ebp - 0xb0]
inc eax
mov dword [ebp - 0xb0], eax
cmp eax, dword [edi + 0x30]
jl 0x4a1990
mov esi, dword [ebp - 0xac]
push dword [esi]
call fcn.005960c7
sub eax, 8
add esp, 4
mov dword [ebp - 0xac], eax
test al, 1
je 0x4a1a86
push dword [esi]
push 0
call fcn.005958b3
add esp, 8
mov dword [ebp - 0xb0], 1
inc dword [ebp - 0xac]
jmp 0x4a1a90
cmp dword [edi + 0x30], 0
jle 0x4a1a09
xor ebx, ebx
push 1
push ebx
push edi
call fcn.00459620
push dword [esi]
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 0x4a1a7e
inc ebx
cmp ebx, dword [edi + 0x30]
jl 0x4a1a46
mov ebx, dword [ebp - 0xb0]
jmp 0x4a1a09
mov dword [ebp - 0xb0], 0
push 1
push 0
push dword [esi]
call fcn.00595cb4
push 0
push 4
push dword [esi]
call fcn.00595cb4
push esi
push dword [ebp - 0xac]
call fcn.0045d510
add esp, 0x20
cmp word [ebp - 0xb0], 0
je 0x4a1ac5
dec dword [ebp - 0xac]
mov eax, 0x7f0
push 0
cmp word [edi + 0x24], ax
je 0x4a1b13
movzx ecx, byte [ebp - 0x9c]
mov eax, 1
shl eax, cl
lea eax, [eax + eax*2]
add eax, 0x40
push eax
push dword [esi]
call fcn.00595cb4
movzx ecx, byte [ebp - 0x9c]
mov eax, 1
shl eax, cl
add esp, 0xc
mov ecx, 0xffffffc4
lea eax, [eax + eax*2]
sub ecx, eax
mov eax, dword [ebp - 0xac]
add eax, ecx
jmp 0x4a1b28
push 0x38
push dword [esi]
call fcn.00595cb4
mov eax, dword [ebp - 0xac]
add esp, 0xc
sub eax, 0x34
push esi
push eax
call fcn.0045d510
push edi
call fcn.00454fa0
add esp, 0xc
mov ecx, dword [ebp - 4]
mov ax, bx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret