Function at 0x479a10
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1dc
mov eax, dword [0x613ad0]
xor eax, esp
mov dword [esp + 0x1d8], eax
mov eax, dword [esp + 0x1e8]
push esi
mov esi, dword [esp + 0x1f0]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x38], ecx
movzx ecx, word [esi + 0xe]
movzx eax, cx
imul eax, edx
add eax, 0x1f
mov dword [esp + 0x24], edx
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
add eax, eax
add eax, eax
cmp cx, 1
push edi
mov edi, dword [esp + 0x1e8]
mov dword [esp + 0x60], esi
mov dword [esp + 0x54], eax
je 0x479aa1
movzx eax, word [esi + 0xe]
cmp ax, 4
je 0x479aa1
cmp ax, 8
je 0x479aa1
pop edi
mov eax, 2
pop esi
mov ecx, dword [esp + 0x1d8]
xor ecx, esp
call fcn.005aac48
add esp, 0x1dc
ret
push ebx
push 0x5da6e0
push edi
call fcn.005ac643
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x38], ebx
jne 0x479ad5
lea eax, [ebx + 3]
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x1d8]
xor ecx, esp
call fcn.005aac48
add esp, 0x1dc
ret
push ebx
push 6
push 1
push str.GIF89a
call fcn.005acf21
add esp, 0x10
cmp eax, 6
jne 0x479b63
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x188], al
sar eax, 8
mov dword [esp + 0x6c], eax
mov byte [esp + 0x189], al
mov eax, dword [esp + 0x40]
mov byte [esp + 0x18a], al
sar eax, 8
mov dword [esp + 0x74], eax
mov byte [esp + 0x18b], al
mov al, byte [esi + 0xe]
sub al, 1
mov dl, 0x11
imul dl
push ebx
or al, 0x80
push 7
mov byte [esp + 0x194], al
lea eax, [esp + 0x190]
push 1
push eax
mov byte [esp + 0x19d], 0
mov byte [esp + 0x19e], 0
call fcn.005acf21
add esp, 0x10
cmp eax, 7
je 0x479b80
push ebx
call fcn.005ac46d
add esp, 4
pop ebx
pop edi
mov eax, 8
pop esi
mov ecx, dword [esp + 0x1d8]
xor ecx, esp
call fcn.005aac48
add esp, 0x1dc
ret
mov cl, byte [esi + 0xe]
mov edx, 1
shl edx, cl
push ebp
xor ebp, ebp
lea edi, [esi + 0x28]
test edx, edx
jle 0x479bd7
mov al, byte [edi + 2]
mov cl, byte [edi + 1]
mov dl, byte [edi]
push ebx
push 3
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push 1
push eax
mov byte [esp + 0x21], cl
mov byte [esp + 0x22], dl
call fcn.005acf21
add esp, 0x10
cmp eax, 3
jne 0x47a260
mov cl, byte [esi + 0xe]
mov edx, 1
shl edx, cl
add ebp, 1
add edi, 4
cmp ebp, edx
jl 0x479b94
cmp dword [esp + 0x1f4], 0
jle 0x47a1af
cmp dword [esp + 0x200], 0xffffffff
je 0x479c53
mov al, byte [esp + 0x200]
push ebx
push 8
lea ecx, [esp + 0x19c]
push 1
push ecx
mov byte [esp + 0x1a4], 0x21
mov byte [esp + 0x1a5], 0xf9
mov byte [esp + 0x1a6], 4
mov byte [esp + 0x1a7], 1
mov byte [esp + 0x1a8], 0
mov byte [esp + 0x1a9], 0
mov byte [esp + 0x1aa], al
mov byte [esp + 0x1ab], 0
call fcn.005acf21
add esp, 0x10
cmp eax, 8
jne 0x47a260
movzx eax, byte [esp + 0x70]
movzx edx, byte [esp + 0x30]
mov esi, dword [esp + 0x68]
mov cl, byte [esp + 0x44]
mov byte [esp + 0x1a2], al
movzx eax, byte [esi + 0xe]
push ebx
mov byte [esp + 0x1a5], dl
movzx edx, byte [esp + 0x7c]
push 0xa
mov byte [esp + 0x1ab], cl
lea ecx, [esp + 0x1a4]
sub al, 1
push 1
push ecx
mov byte [esp + 0x1ac], 0x2c
mov byte [esp + 0x1ad], 0
mov byte [esp + 0x1ae], 0
mov byte [esp + 0x1af], 0
mov byte [esp + 0x1b0], 0
mov byte [esp + 0x1b4], dl
mov byte [esp + 0x1b5], al
call fcn.005acf21
add esp, 0x10
cmp eax, 0xa
jne 0x47a260
push 0xfa00
call fcn.00475c60
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x28], edi
je 0x47a1f3
push 0x8004
call fcn.00475c60
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x10], ebp
je 0x47a203
movzx eax, word [esi + 0xe]
add eax, 1
cmp eax, 2
mov dword [esp + 0x2c], eax
jne 0x479d27
mov dword [esp + 0x2c], 3
mov dl, byte [esp + 0x2c]
push ebx
push 1
lea eax, [esp + 0x1f]
sub dl, 1
push 1
push eax
mov byte [esp + 0x27], dl
call fcn.005acf21
add esp, 0x10
cmp eax, 1
jne 0x47a219
mov cl, byte [esp + 0x17]
mov edx, eax
shl edx, cl
push 0x101
push 0
mov dword [esp + 0x84], ebx
movzx esi, dx
mov edx, dword [esp + 0x34]
lea eax, [esi + 1]
movzx ecx, ax
lea eax, [esp + 0x90]
push eax
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], edx
call fcn.00475d50
movzx eax, si
add esp, 0xc
lea esi, [esp + 0x7c]
mov dword [esp + 0x74], eax
call fcn.004798f0
test al, al
je 0x47a219
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x58]
xor eax, eax
mov ecx, 0x2001
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x44]
add eax, 0xffffffff
mov ecx, eax
imul ecx, dword [esp + 0x5c]
add ecx, dword [esi]
xor edx, edx
cmp eax, edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x1c], edx
mov ebp, 0x2001
mov dword [esp + 0x48], ecx
mov dword [esp + 0x60], eax
jl 0x47a145
jmp 0x479e04
mov ecx, dword [esp + 0x48]
xor eax, eax
cmp dword [esp + 0x30], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x18], ecx
jle 0x47a126
jmp 0x479e24
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x68]
movzx ecx, word [ecx + 0xe]
cmp ecx, 4
je 0x479e70
cmp ecx, 8
je 0x479e61
and eax, 7
cmp eax, 7
jne 0x479e50
mov eax, dword [esp + 0x18]
mov bl, byte [eax]
and bl, 1
add eax, 1
mov dword [esp + 0x18], eax
jmp 0x479e89
mov edx, dword [esp + 0x18]
mov bl, byte [edx]
mov cl, 7
sub cl, al
shr bl, cl
and bl, 1
jmp 0x479e89
mov eax, dword [esp + 0x18]
mov bl, byte [eax]
add eax, 1
mov dword [esp + 0x18], eax
jmp 0x479e89
test al, 1
mov eax, dword [esp + 0x18]
mov bl, byte [eax]
je 0x479e86
and bl, 0xf
add eax, 1
mov dword [esp + 0x18], eax
jmp 0x479e89
shr bl, 4
mov eax, dword [esp + 0x1c]
add eax, 1
cmp eax, 1
mov byte [esp + 0x1a8], al
mov dword [esp + 0x1c], eax
mov byte [esp + eax + 0x1a8], bl
jne 0x479ec3
movzx cx, bl
movzx ebp, bl
movzx edx, cx
add ebp, 3
mov dword [esp + 0x34], edx
imul ebp, ebp, 0x12d
jmp 0x47a111
movzx ecx, bl
add eax, ecx
imul ebp, eax
mov eax, 0x3ffe001
mul ebp
shr edx, 7
imul edx, edx, 0x2001
mov edi, ebp
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x54], ebp
sub edi, edx
mov dword [esp + 0x64], 0
nop
add edi, 1
cmp edi, 0x2001
jb 0x479efd
xor edi, edi
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + edi*4]
test edx, edx
je 0x479fbb
mov eax, dword [esp + 0x1c]
add eax, 1
add edx, 2
cmp eax, 4
lea ecx, [esp + 0x1a8]
jb 0x479f36
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x479f3a
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x479f22
test eax, eax
je 0x479f9f
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x479f89
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x479f9b
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x479f89
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x479f9b
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x479f89
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x479f9b
movzx esi, byte [edx]
movzx edx, byte [ecx]
sub esi, edx
je 0x479f9b
test esi, esi
mov ebp, dword [esp + 0x54]
mov eax, 1
jg 0x479fa1
or eax, 0xffffffff
jmp 0x479fa1
mov ebp, dword [esp + 0x54]
xor eax, eax
test eax, eax
je 0x479fbb
mov eax, dword [esp + 0x64]
add eax, 1
cmp eax, 0x2001
mov dword [esp + 0x64], eax
jb 0x479ef0
mov eax, dword [esp + 0x10]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x479fee
mov ecx, dword [esp + 0x1c]
add ecx, 3
cmp ecx, 0x40
jae 0x479fee
movzx dx, byte [eax + 1]
movzx ax, byte [eax]
shl dx, 8
add dx, ax
movzx ecx, dx
mov dword [esp + 0x34], ecx
jmp 0x47a111
movzx eax, word [esp + 0x34]
lea esi, [esp + 0x7c]
call fcn.004798f0
test al, al
mov edx, dword [esp + 0x10]
je 0x47a239
mov ebp, 1
add dword [esp + 0x24], ebp
cmp dword [edx + edi*4], 0
jne 0x47a061
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x38]
add ecx, eax
mov eax, dword [esp + 0x28]
movzx ecx, cx
add eax, esi
mov dword [edx + edi*4], eax
mov byte [eax], cl
mov byte [eax + 1], ch
mov ecx, dword [esp + 0x1c]
add ecx, ebp
push ecx
lea edx, [esp + 0x1ac]
push edx
add eax, 2
push eax
call fcn.00475db0
mov eax, dword [esp + 0x28]
lea ecx, [esi + eax + 3]
add esp, 0xc
add dword [esp + 0x4c], ebp
mov dword [esp + 0x38], ecx
movzx eax, word [esp + 0x50]
mov ecx, dword [esp + 0x24]
mov esi, ebp
mov ebp, dword [esp + 0x6c]
add eax, ecx
mov ecx, dword [esp + 0x84]
movzx dx, bl
mov edi, esi
shl edi, cl
add ebp, 3
movzx edx, dx
imul ebp, ebp, 0x12d
cmp eax, edi
mov byte [esp + 0x1a8], 1
mov dword [esp + 0x1c], esi
mov byte [esp + 0x1a9], bl
mov dword [esp + 0x34], edx
jne 0x47a0af
add dword [esp + 0x84], esi
cmp eax, 0xffd
jg 0x47a0c4
mov eax, dword [esp + 0x38]
add eax, 0x40
cmp eax, 0xfa00
jle 0x47a111
movzx eax, dx
lea esi, [esp + 0x7c]
call fcn.004798f0
test al, al
je 0x47a235
mov eax, dword [esp + 0x74]
call fcn.004798f0
test al, al
je 0x47a235
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x84], ecx
mov ecx, 0x2001
mov dword [esp + 0x24], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x40]
add eax, 1
cmp eax, dword [esp + 0x30]
mov dword [esp + 0x40], eax
jl 0x479e20
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
sub dword [esp + 0x48], edx
sub eax, 1
test eax, eax
mov dword [esp + 0x60], eax
jge 0x479e00
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
push eax
call fcn.00475cc0
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00475cc0
movzx eax, word [esp + 0x3c]
add esp, 8
lea esi, [esp + 0x7c]
call fcn.004798f0
test al, al
je 0x47a260
movzx eax, word [esp + 0x50]
call fcn.004798f0
test al, al
je 0x47a260
call fcn.00479990
test al, al
je 0x47a260
mov eax, dword [esp + 0x1f4]
add dword [esp + 0x58], 4
sub eax, 1
test eax, eax
mov dword [esp + 0x1f4], eax
jg 0x479be5
push ebx
push 1
lea edx, [esp + 0x2b]
push 1
push edx
mov byte [esp + 0x33], 0x3b
call fcn.005acf21
add esp, 0x10
cmp eax, 1
jne 0x47a269
push ebx
call fcn.005ac46d
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x1e8]
pop ebp
pop ebx
pop edi
pop esi
xor ecx, esp
call fcn.005aac48
add esp, 0x1dc
ret
push ebx
call fcn.005ac46d
add esp, 4
mov eax, 1
jmp 0x47a1da
push edi
call fcn.00475cc0
push ebx
call fcn.005ac46d
add esp, 8
mov eax, 1
jmp 0x47a1da
push ebp
call fcn.00475cc0
push edi
call fcn.00475cc0
push ebx
call fcn.005ac46d
add esp, 0xc
mov eax, 8
jmp 0x47a1da
mov edx, dword [esp + 0x10]
push edx
call fcn.00475cc0
mov eax, dword [esp + 0x2c]
push eax
call fcn.00475cc0
mov ecx, dword [esp + 0x44]
push ecx
call fcn.005ac46d
add esp, 0xc
mov eax, 8
jmp 0x47a1da
push ebx
call fcn.005ac46d
add esp, 4
mov eax, 8
jmp 0x47a1da