Function at 0x10005ae4
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10018735
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x70
mov eax, dword [ebx + 0xc]
push esi
mov esi, ecx
mov ecx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x30], ecx
push edi
cmp eax, 2
je 0x10005c27
cmp eax, 3
je 0x10005c27
cmp eax, 6
je 0x10005b62
cmp eax, 7
je 0x10005b62
add eax, 0xfffffffc
cmp eax, 0x13
ja case.0x10005a82.6
jmp dword [eax*4 + 0x100065c4]
mov edx, 0xfde9
jmp 0x10005af7
mov edx, 0xfde8
jmp 0x10005af7
mov edx, 0x3a4
jmp 0x10005af7
mov edx, 0x4e4
jmp 0x10005af7
mov edx, 0x4e2
jmp 0x10005af7
mov edx, 0x3a8
jmp 0x10005af7
mov edx, 0x3b6
jmp 0x10005af7
mov edx, 0x3b5
jmp 0x10005af7
mov edx, 0x4e3
jmp 0x10005af7
mov edx, 0x4e5
jmp 0x10005af7
mov edx, 0x4e6
jmp 0x10005af7
mov edx, 0x4e7
jmp 0x10005af7
mov edx, 0x4e8
jmp 0x10005af7
mov edx, 0x4e9
jmp 0x10005af7
mov edx, 0x4ea
jmp 0x10005af7
mov edx, 0x36a
cmp dword [esi + 0xc], 1
lea edi, [esi + 0xc]
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x20], edi
jge 0x10005b0d
xor ecx, ecx
jmp 0x10005c49
xor edi, edi
xor esi, esi
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x10]
mov ecx, dword [eax + esi*8 + 4]
test ecx, ecx
je 0x10005b33
push 0
push 0
push 0
push 0
push ecx
push dword [eax + esi*8]
push 0
push edx
call dword [ebp - 0x30]
add edi, eax
mov eax, dword [ebp - 0x20]
inc esi
mov edx, dword [ebp - 0x14]
mov ecx, dword [eax]
cmp esi, ecx
jl 0x10005b11
lea eax, [ecx - 1]
dec ecx
add ecx, edi
lea eax, [edi + eax*2]
cmp dword [ebx + 0x10], 2
mov edi, dword [ebp - 0x20]
cmove ecx, eax
jmp 0x10005c46
mov eax, 6
jmp 0x100065ad
mov edx, dword [esi + 0xc]
lea edi, [esi + 0xc]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], edx
cmp edx, 1
jge 0x10005b83
mov esi, dword [ebp - 0x38]
xor ecx, ecx
shl ecx, 2
mov dword [ebp - 0x14], esi
jmp 0x10005c49
mov ecx, dword [esi + 0x10]
xor edi, edi
xor eax, eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], 0xfc00
mov dword [ebp - 0x38], 0xd800
mov dword [ebp - 0x34], 0xdc00
mov esi, dword [ecx + eax*8 + 4]
test esi, esi
je 0x10005bff
mov eax, dword [ecx + eax*8]
mov edx, 1
mov dword [ebp - 0x24], eax
xor ecx, ecx
nop word [eax + eax]
cmp edx, esi
jae 0x10005bec
mov ax, word [eax + ecx*2]
and ax, word [ebp - 0x28]
cmp ax, word [ebp - 0x38]
jne 0x10005bec
mov eax, dword [ebp - 0x24]
mov ax, word [eax + ecx*2 + 2]
and ax, word [ebp - 0x28]
cmp ax, word [ebp - 0x34]
jne 0x10005bec
add ecx, 2
add edx, 2
jmp 0x10005bee
inc ecx
inc edx
mov eax, dword [ebp - 0x24]
inc edi
cmp ecx, esi
jb 0x10005bc0
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, edx
jl 0x10005ba5
mov esi, dword [ebp - 0x38]
lea eax, [edx - 1]
xor ecx, ecx
mov dword [ebp - 0x14], esi
cmp dword [ebx + 0x10], 2
sete cl
inc ecx
imul ecx, eax
add ecx, edi
mov edi, dword [ebp - 0x20]
shl ecx, 2
jmp 0x10005c49
cmp dword [ebx + 0x10], 2
mov ecx, esi
sete al
movzx eax, al
push eax
call fcn.100049b0
mov ecx, eax
lea edi, [esi + 0xc]
mov eax, dword [ebp - 0x38]
add ecx, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x48], 0x1003bd5c
push ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], 0
call fcn.10004770
mov edx, eax
mov dword [ebp - 0x1c], edx
test edx, edx
jne 0x10005c82
lea esi, [eax + 1]
jmp 0x1000658d
xor ecx, ecx
mov esi, edx
mov dword [ebp - 0x28], ecx
cmp dword [edi], ecx
jle 0x10005e44
lea edi, [ecx + 0xd]
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x10]
mov ecx, dword [eax + ecx*8 + 4]
mov dword [ebp - 0x24], ecx
test ecx, ecx
je 0x10005d92
mov edi, dword [ebp - 0x28]
mov edi, dword [eax + edi*8]
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x34], edi
cmp eax, 2
je 0x10005d55
cmp eax, 3
je 0x10005d55
cmp eax, 6
je 0x10005ced
cmp eax, 7
je 0x10005ced
push 0
push 0
sub edx, esi
add edx, dword [ebp - 0x18]
push edx
push esi
push ecx
push edi
push 0
push dword [ebp - 0x14]
call dword [ebp - 0x30]
add esi, eax
jmp 0x10005d8d
xor eax, eax
mov dword [ebp - 0x38], eax
lea ecx, [eax + 1]
lea edx, [eax + eax]
mov dword [ebp - 0x3c], ecx
cmp ecx, dword [ebp - 0x24]
jae 0x10005d3f
movzx ecx, word [edx + edi]
mov eax, ecx
and eax, 0xfc00
cmp eax, 0xd800
jne 0x10005d3f
movzx eax, word [edx + edi + 2]
mov edi, eax
and eax, 0xfc00
cmp eax, 0xdc00
jne 0x10005d3c
mov eax, dword [ebp - 0x38]
and edi, 0x3ff
shr ecx, 6
and ecx, 0xf
inc ecx
or ecx, edi
mov edi, dword [ebp - 0x34]
jmp 0x10005d49
mov edi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x3c]
movzx ecx, word [edx + edi]
mov dword [ebp - 0x38], eax
mov dword [esi], ecx
add esi, 4
cmp eax, dword [ebp - 0x24]
jb 0x10005cf2
jmp 0x10005d8d
add ecx, ecx
cmp esi, 0x10000
jb 0x10005d87
mov eax, esi
not eax
cmp ecx, eax
ja 0x10005d87
cmp edi, 0x10000
jb 0x10005d87
or eax, 0xffffffff
sub eax, edi
cmp ecx, eax
ja 0x10005d87
test ecx, ecx
je 0x10005d87
push ecx
push edi
push esi
call fcn.1000db80
add esp, 0xc
mov eax, dword [ebp - 0x24]
lea esi, [esi + eax*2]
mov edi, 0xd
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
mov eax, dword [edx]
dec eax
cmp ecx, eax
jge 0x10005e35
mov eax, dword [ebx + 0xc]
cmp eax, 2
je 0x10005e0d
cmp eax, 3
je 0x10005e0d
cmp eax, 6
je 0x10005ddc
cmp eax, 7
je 0x10005ddc
mov eax, dword [ebx + 0x10]
sub eax, 1
je 0x10005dd6
sub eax, 1
je 0x10005dd2
sub eax, 1
jne 0x10005e35
mov byte [esi], 0xd
inc esi
jmp 0x10005e35
mov byte [esi], 0xd
inc esi
mov byte [esi], 0xa
inc esi
jmp 0x10005e35
mov eax, dword [ebx + 0x10]
sub eax, 1
je 0x10005e02
sub eax, 1
je 0x10005df9
sub eax, 1
jne 0x10005e35
mov dword [esi], 0xd
add esi, 4
jmp 0x10005e35
mov dword [esi], 0xd
add esi, 4
mov dword [esi], 0xa
add esi, 4
jmp 0x10005e35
mov eax, dword [ebx + 0x10]
sub eax, 1
je 0x10005e2a
sub eax, 1
je 0x10005e24
sub eax, 1
jne 0x10005e35
mov word [esi], di
jmp 0x10005e32
mov word [esi], di
add esi, 2
mov eax, 0xa
mov word [esi], ax
add esi, 2
inc ecx
cmp ecx, dword [edx]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], ecx
jl 0x10005c94
xor eax, eax
mov dword [ebp - 0x7c], vtable.PictureFan::FileStream.0
xorps xmm0, xmm0
mov dword [ebp - 0x78], 0xffffffff
movups xmmword [ebp - 0x74], xmm0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 7
mov word [ebp - 0x74], ax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], 0x1003bce0
mov dword [ebp - 0x50], 0x8000
mov dword [ebp - 0x4c], eax
push 0x22
push dword [ebx + 8]
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 1
call fcn.1000b3a0
test al, al
jne 0x10005ea3
mov esi, 2
jmp 0x10006585
cmp dword [ebx + 0x14], 0
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
je case.0x10005ec1.5
mov esi, dword [ebx + 0xc]
lea ecx, [esi - 2]
cmp ecx, 5
ja case.0x10005ec1.5
jmp dword [ecx*4 + 0x10006614]
cmp dword [ebp - 0x58], 0
je 0x10005fb5
mov esi, dword [ebp - 0x54]
mov edx, 2
mov ecx, dword [ebp - 0x4c]
mov edi, 0x1003bde4
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x20], edx
cmp ecx, esi
jne 0x10005f18
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x7c]
mov eax, dword [eax + 0x40]
cmp eax, fcn.1000bae0
jne 0x10005f03
call fcn.1000bae0
jmp 0x10005f05
call eax
test al, al
je 0x10005fce
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
jmp 0x10005fa7
test ecx, ecx
jne 0x10005f51
cmp edx, esi
jb 0x10005f51
push ecx
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x38]
push ecx
push esi
push edi
push dword [ebp - 0x78]
call eax
test eax, eax
je 0x10005fce
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x38]
sub edx, eax
mov dword [ebp - 0x20], edx
cmp eax, esi
jb 0x10005fce
mov ecx, dword [ebp - 0x4c]
add edi, eax
jmp 0x10005fa7
mov eax, esi
mov esi, edx
sub eax, ecx
cmp eax, edx
cmovb esi, eax
mov eax, dword [ebp - 0x58]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp eax, 0x10000
jb 0x10005f98
not eax
cmp esi, eax
ja 0x10005f98
cmp edi, 0x10000
jb 0x10005f98
mov eax, edi
not eax
cmp esi, eax
ja 0x10005f98
test esi, esi
je 0x10005f98
push esi
push edi
push dword [ebp - 0x3c]
call fcn.1000db80
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
mov edx, dword [ebp - 0x20]
sub edx, esi
add edi, esi
add ecx, esi
mov dword [ebp - 0x20], edx
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x4c], ecx
test edx, edx
je 0x10005fd1
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10005ee8
push 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push ecx
push 2
push 0x1003bde4
push dword [ebp - 0x78]
call eax
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebx + 0xc]
add eax, 0xfffffffe
jmp switch.0x1000643d
cmp dword [ebp - 0x58], 0
je 0x100060c9
mov esi, dword [ebp - 0x54]
mov edx, 2
mov ecx, dword [ebp - 0x4c]
mov edi, 0x1003be2c
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x20], edx
nop dword [eax]
cmp ecx, esi
jne 0x1000602c
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x7c]
mov eax, dword [eax + 0x40]
cmp eax, fcn.1000bae0
jne 0x1000601b
call fcn.1000bae0
jmp 0x1000601d
call eax
test al, al
je 0x10005fce
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
jmp 0x100060b7
test ecx, ecx
jne 0x10006061
cmp edx, esi
jb 0x10006061
push ecx
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x38]
push ecx
push esi
push edi
push dword [ebp - 0x78]
call eax
test eax, eax
je 0x10005fce
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x38]
sub edx, eax
mov dword [ebp - 0x20], edx
cmp eax, esi
jb 0x10005fce
mov ecx, dword [ebp - 0x4c]
add edi, eax
jmp 0x100060b7
mov eax, esi
mov esi, edx
sub eax, ecx
cmp eax, edx
cmovb esi, eax
mov eax, dword [ebp - 0x58]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp eax, 0x10000
jb 0x100060a8
not eax
cmp esi, eax
ja 0x100060a8
cmp edi, 0x10000
jb 0x100060a8
mov eax, edi
not eax
cmp esi, eax
ja 0x100060a8
test esi, esi
je 0x100060a8
push esi
push edi
push dword [ebp - 0x3c]
call fcn.1000db80
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
mov edx, dword [ebp - 0x20]
sub edx, esi
add edi, esi
add ecx, esi
mov dword [ebp - 0x20], edx
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x4c], ecx
test edx, edx
je 0x10005fd1
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10006000
push 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push ecx
push 2
push 0x1003be2c
push dword [ebp - 0x78]
call eax
mov eax, dword [ebx + 0xc]
add eax, 0xfffffffe
jmp 0x1000643a
cmp dword [ebp - 0x58], 0
je 0x100061e1
mov esi, dword [ebp - 0x54]
mov edx, 3
mov ecx, dword [ebp - 0x4c]
mov edi, 0x1003be28
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x20], edx
nop dword [eax]
cmp ecx, esi
jne 0x10006140
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x7c]
mov eax, dword [eax + 0x40]
cmp eax, fcn.1000bae0
jne 0x1000612b
call fcn.1000bae0
jmp 0x1000612d
call eax
test al, al
je 0x10005fce
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
jmp 0x100061cf
test ecx, ecx
jne 0x10006179
cmp edx, esi
jb 0x10006179
push ecx
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x38]
push ecx
push esi
push edi
push dword [ebp - 0x78]
call eax
test eax, eax
je 0x10005fce
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x38]
sub edx, eax
mov dword [ebp - 0x20], edx
cmp eax, esi
jb 0x10005fce
mov ecx, dword [ebp - 0x4c]
add edi, eax
jmp 0x100061cf
mov eax, esi
mov esi, edx
sub eax, ecx
cmp eax, edx
cmovb esi, eax
mov eax, dword [ebp - 0x58]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp eax, 0x10000
jb 0x100061c0
not eax
cmp esi, eax
ja 0x100061c0
cmp edi, 0x10000
jb 0x100061c0
mov eax, edi
not eax
cmp esi, eax
ja 0x100061c0
test esi, esi
je 0x100061c0
push esi
push edi
push dword [ebp - 0x3c]
call fcn.1000db80
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
mov edx, dword [ebp - 0x20]
sub edx, esi
add edi, esi
add ecx, esi
mov dword [ebp - 0x20], edx
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x4c], ecx
test edx, edx
je 0x10005fd1
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10006110
push 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push ecx
push 3
push 0x1003be28
push dword [ebp - 0x78]
call eax
mov eax, dword [ebx + 0xc]
add eax, 0xfffffffe
jmp 0x1000643a
cmp dword [ebp - 0x58], 0
je 0x100062f6
mov esi, dword [ebp - 0x54]
mov edx, 4
mov ecx, dword [ebp - 0x4c]
mov edi, 0x1003be24
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x20], edx
cmp ecx, esi
jne 0x10006255
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x7c]
mov eax, dword [eax + 0x40]
cmp eax, fcn.1000bae0
jne 0x10006240
call fcn.1000bae0
jmp 0x10006242
call eax
test al, al
je 0x10005fce
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
jmp 0x100062e4
test ecx, ecx
jne 0x1000628e
cmp edx, esi
jb 0x1000628e
push ecx
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x38]
push ecx
push esi
push edi
push dword [ebp - 0x78]
call eax
test eax, eax
je 0x10005fce
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x38]
sub edx, eax
mov dword [ebp - 0x20], edx
cmp eax, esi
jb 0x10005fce
mov ecx, dword [ebp - 0x4c]
add edi, eax
jmp 0x100062e4
mov eax, esi
mov esi, edx
sub eax, ecx
cmp eax, edx
cmovb esi, eax
mov eax, dword [ebp - 0x58]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp eax, 0x10000
jb 0x100062d5
not eax
cmp esi, eax
ja 0x100062d5
cmp edi, 0x10000
jb 0x100062d5
mov eax, edi
not eax
cmp esi, eax
ja 0x100062d5
test esi, esi
je 0x100062d5
push esi
push edi
push dword [ebp - 0x3c]
call fcn.1000db80
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
mov edx, dword [ebp - 0x20]
sub edx, esi
add edi, esi
add ecx, esi
mov dword [ebp - 0x20], edx
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x4c], ecx
test edx, edx
je 0x10005fd1
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10006225
push 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push ecx
push 4
push 0x1003be24
push dword [ebp - 0x78]
call eax
mov eax, dword [ebx + 0xc]
add eax, 0xfffffffe
jmp 0x1000643a
cmp dword [ebp - 0x58], 0
je 0x10006411
mov esi, dword [ebp - 0x54]
mov edx, 4
mov ecx, dword [ebp - 0x4c]
mov edi, 0x1003bde8
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x20], edx
nop word [eax + eax]
cmp ecx, esi
jne 0x10006370
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x7c]
mov eax, dword [eax + 0x40]
cmp eax, fcn.1000bae0
jne 0x1000635b
call fcn.1000bae0
jmp 0x1000635d
call eax
test al, al
je 0x10005fce
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
jmp 0x100063ff
test ecx, ecx
jne 0x100063a9
cmp edx, esi
jb 0x100063a9
push ecx
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x38]
push ecx
push esi
push edi
push dword [ebp - 0x78]
call eax
test eax, eax
je 0x10005fce
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x38]
sub edx, eax
mov dword [ebp - 0x20], edx
cmp eax, esi
jb 0x10005fce
mov ecx, dword [ebp - 0x4c]
add edi, eax
jmp 0x100063ff
mov eax, esi
mov esi, edx
sub eax, ecx
cmp eax, edx
cmovb esi, eax
mov eax, dword [ebp - 0x58]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp eax, 0x10000
jb 0x100063f0
not eax
cmp esi, eax
ja 0x100063f0
cmp edi, 0x10000
jb 0x100063f0
mov eax, edi
not eax
cmp esi, eax
ja 0x100063f0
test esi, esi
je 0x100063f0
push esi
push edi
push dword [ebp - 0x3c]
call fcn.1000db80
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
mov edx, dword [ebp - 0x20]
sub edx, esi
add edi, esi
add ecx, esi
mov dword [ebp - 0x20], edx
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x4c], ecx
test edx, edx
je 0x10005fd1
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10006340
push 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push ecx
push 4
push 0x1003bde8
push dword [ebp - 0x78]
call eax
lea eax, [esi - 2]
jmp 0x1000643a
mov eax, dword [ebx + 0xc]
add eax, 0xfffffffe
cmp eax, 5
ja case.default.0x1000643d
mov ecx, dword [ebp - 0x4c]
jmp dword [eax*4 + 0x1000662c]
mov esi, dword [ebp - 0x18]
mov edx, esi
mov edi, dword [ebp - 0x1c]
mov ecx, edi
shr edx, 1
call fcn.1000ac70
mov ecx, dword [ebp - 0x4c]
jmp 0x1000647a
mov esi, dword [ebp - 0x18]
mov edx, esi
mov edi, dword [ebp - 0x1c]
mov ecx, edi
shr edx, 2
call fcn.1000ae80
mov ecx, dword [ebp - 0x4c]
jmp 0x1000647a
mov ecx, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x10006576
cmp dword [ebp - 0x58], 0
je 0x10006552
mov edi, dword [ebp - 0x54]
nop
cmp ecx, edi
jne 0x100064bd
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x7c]
mov eax, dword [eax + 0x40]
cmp eax, fcn.1000bae0
jne 0x100064ab
call fcn.1000bae0
jmp 0x100064ad
call eax
test al, al
je 0x1000654b
mov ecx, dword [ebp - 0x4c]
jmp 0x10006543
test ecx, ecx
jne 0x100064f2
cmp esi, edi
jb 0x100064f2
push ecx
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], ecx
push eax
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000654b
mov eax, dword [ebp - 0x38]
sub esi, eax
mov dword [ebp - 0x18], esi
cmp eax, edi
jb 0x1000654b
add dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x4c]
jmp 0x10006543
mov edx, dword [ebp - 0x58]
mov eax, edi
sub eax, ecx
cmp eax, dword [ebp - 0x18]
cmovb esi, eax
add edx, ecx
cmp edx, 0x10000
jb 0x10006535
mov eax, edx
not eax
cmp esi, eax
ja 0x10006535
mov eax, dword [ebp - 0x1c]
cmp eax, 0x10000
jb 0x10006535
not eax
cmp esi, eax
ja 0x10006535
test esi, esi
je 0x10006535
push esi
push dword [ebp - 0x1c]
push edx
call fcn.1000db80
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
add dword [ebp - 0x1c], esi
sub dword [ebp - 0x18], esi
add ecx, esi
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x4c], ecx
test esi, esi
jne 0x10006490
test esi, esi
sete al
jmp 0x10006578
push 0
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
push esi
push edi
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10006576
cmp dword [ebp - 0x34], esi
sete al
jmp 0x10006578
xor al, al
test al, al
jne 0x10006583
mov esi, 4
jmp 0x10006585
xor esi, esi
lea ecx, [ebp - 0x7c]
call fcn.1000b2a0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], vtable.PictureFan::MemoryBuffer.0
test eax, eax
je 0x100065ab
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10