Function at 0x4a0520
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0xa8]
push esi
mov esi, dword [ebp + 0xc]
push edi
push eax
call fcn.00458dd0
add esp, 4
cmp word [ebp + 0x14], 0
je 0x4a0564
mov eax, dword [0x5d2da8]
movq xmm0, qword [str.OS_2_Bitmap]
mov dword [ebp - 0x7c], eax
jmp 0x4a0586
mov eax, dword [0x5d2d64]
movq xmm0, qword [str.Windows_Bitmap]
mov dword [ebp - 0x7c], eax
mov ax, word [0x5d2d68]
mov word [ebp - 0x78], ax
mov al, byte [0x5d2d6a]
mov byte [ebp - 0x76], al
cmp word [esi + 0xac], 0
movq qword [ebp - 0x84], xmm0
je 0x4a05c3
lea ecx, [ebp - 0x84]
dec ecx
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4a05a0
mov eax, dword [str.__RLE_]
mov dword [ecx], eax
mov ax, word [0x5db6a0]
mov word [ecx + 4], ax
mov al, byte [0x5db6a2]
mov byte [ecx + 6], al
mov eax, 0x10
mov ecx, 1
mov word [ebp - 0xa4], ax
mov eax, dword [ebp + 0x10]
mov word [ebp - 0x9a], ax
mov word [ebp - 0x9c], cx
cmp ax, cx
jne 0x4a05fb
mov eax, dword [esi + 0x2c]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
jmp 0x4a0621
cmp ax, 2
jne 0x4a0612
mov eax, dword [esi + 0x2c]
add eax, 3
cdq
and edx, 3
add eax, edx
sar eax, 2
jmp 0x4a0621
cmp ax, 4
mov eax, dword [esi + 0x2c]
jne 0x4a0621
inc eax
cdq
sub eax, edx
sar eax, 1
add eax, 3
mov dword [ebp - 0x8c], 0x80100
and eax, 0xfffffffc
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0xa8]
push eax
push esi
call fcn.00457000
movzx edi, ax
add esp, 8
mov dword [ebp - 0xb0], edi
test di, di
jne 0x4a07d0
mov cl, byte [ebp + 0x10]
mov edx, 1
shl edx, cl
mov dword [ebp - 0xac], edx
test edx, edx
jle 0x4a06e3
mov edi, dword [ebp - 0x88]
add edi, 2
cmp word [ebp + 0x14], 0
push dword [ebx]
jne 0x4a06ae
movzx eax, byte [edi]
push eax
call fcn.005958b3
push dword [ebx]
movzx eax, byte [edi - 1]
push eax
call fcn.005958b3
push dword [ebx]
movzx eax, byte [edi - 2]
push eax
call fcn.005958b3
push dword [ebx]
push 0
call fcn.005958b3
add esp, 0x20
jmp 0x4a06d2
movzx eax, byte [edi - 2]
push eax
call fcn.005958b3
push dword [ebx]
movzx eax, byte [edi - 1]
push eax
call fcn.005958b3
push dword [ebx]
movzx eax, byte [edi]
push eax
call fcn.005958b3
add esp, 0x18
add edi, 3
dec dword [ebp - 0xac]
jne 0x4a0676
mov edi, dword [ebp - 0xb0]
xor eax, eax
mov dword [ebp - 0xac], eax
cmp dword [esi + 0x30], eax
jle 0x4a0795
test di, di
jne 0x4a0795
push 1
push eax
push esi
call fcn.00459620
mov ax, word [ebp - 0x9a]
add esp, 0xc
cmp ax, 8
jne 0x4a0736
cmp word [esi + 0xac], di
je 0x4a075d
push dword [esi + 0x2c]
push dword [ebp - 0xa0]
push ebx
call fcn.004a0110
add esp, 0xc
movzx edi, ax
jmp 0x4a077f
cmp ax, 4
jne 0x4a075d
cmp word [esi + 0xac], 0
je 0x4a075d
push dword [esi + 0x2c]
push dword [ebp - 0xa0]
push ebx
call fcn.0049fea0
add esp, 0xc
movzx edi, ax
jmp 0x4a077f
push dword [ebx]
push 1
push dword [ebp - 0x90]
push dword [ebp - 0xa0]
call fcn.0059628c
add esp, 0x10
mov ecx, 6
test eax, eax
cmove edi, ecx
mov eax, dword [ebp - 0xac]
inc eax
mov dword [ebp - 0xac], eax
cmp eax, dword [esi + 0x30]
jl 0x4a06f4
cmp word [esi + 0xac], 0
je 0x4a07c7
mov ax, word [ebp - 0x9a]
cmp ax, 4
je 0x4a07b2
cmp ax, 8
jne 0x4a07c7
push dword [ebx]
push 0
call fcn.005958b3
push dword [ebx]
push 1
call fcn.005958b3
add esp, 0x10
push esi
call fcn.00454fa0
add esp, 4
mov ecx, dword [ebp - 4]
mov ax, di
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret