Function at 0x40a330
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
lea edx, [ebp - 0x43c]
sub esp, 0x51c
mov edi, edx
mov dword [ebp - 0x4c8], ecx
mov ecx, 9
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x10]
mov esi, dword [eax]
cmp byte [esi], 0x3e
je 0x40a6f8
mov byte [ebp - 0x420], 1
mov dword [ebp - 0x4d0], 1
mov byte [ebp - 0x4ca], 1
mov dword [esp + 4], eax
lea eax, [ebp - 0x49c]
mov dword [esp], eax
call fcn.0041d190
mov eax, dword [ebp - 0x498]
cmp eax, 1
je 0x40a5c8
test eax, eax
jne 0x40a5d7
mov edx, dword [ebp - 0x49c]
cmp byte [ebp - 0x4ca], 0
mov ecx, dword [0x4b61c0]
mov eax, 0x488207
je 0x40a3c1
mov eax, 0x488203
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], edx
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 8], str.image__3u____30s___20s__5u__5u__5u__5u__5u__6u__4s
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x488202
mov dword [esp], ecx
call fcn.00425460
lea edx, [ebp - 0x418]
mov dword [ebp - 0x4b0], 0
mov dword [ebp - 0x4ac], 0
mov dword [ebp - 0x4b4], 0
xor edi, edi
mov eax, 0xa
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x4c0], edx
mov ecx, edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x4c8]
mov dword [esp], eax
call fcn.0040c070
sub esp, 0xc
and edi, 0xffff
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov edi, dword [ebp - 0x4c0]
mov ecx, edi
call fcn.0040c4d0
sub esp, 0xc
mov ecx, edi
mov dword [esp + 8], 2
mov eax, dword [ebp - 0x4b4]
and eax, 0xffff
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040c4d0
sub esp, 0xc
mov ecx, edi
mov dword [esp + 8], 4
mov eax, dword [ebp - 0x4ac]
and eax, 0xffff
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040c4d0
sub esp, 0xc
mov ecx, edi
mov dword [esp + 8], 6
mov dword [esp + 4], 3
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040c490
sub esp, 0xc
mov ecx, edi
mov dword [esp + 8], 7
mov eax, dword [ebp - 0x4b0]
and eax, 0xffff
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040c4d0
sub esp, 0xc
mov ecx, edi
mov dword [esp + 8], 9
mov eax, dword [ebp - 0x4d0]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040c490
sub esp, 0xc
test ebx, ebx
je 0x40a585
add ebx, ebx
mov dword [esp + 8], 0xa
mov dword [esp + 0xc], ebx
mov dword [esp + 4], esi
mov eax, dword [ebp + 8]
mov ecx, edi
mov dword [esp], eax
call fcn.0040c340
sub esp, 0x10
test esi, esi
je 0x40a585
mov dword [esp], esi
call fcn.0047ffe0
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov ecx, dword [ebp - 0x4c0]
call fcn.0040c1d0
push eax
lea eax, [ebp - 0x494]
mov edx, dword [ebp - 0x49c]
cmp edx, eax
je 0x40a5ba
mov eax, dword [ebp - 0x494]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov edx, dword [ebp - 0x49c]
cmp byte [edx], 0x2d
je 0x40a3a8
lea eax, [ebp - 0x47c]
mov dword [ebp - 0x480], 0
mov dword [ebp - 0x484], eax
mov byte [ebp - 0x47c], 0
lea ecx, [ebp - 0x49c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0x2f
call fcn.00476660
cmp eax, 0xffffffff
push ebx
push ebx
je 0x40a838
inc eax
mov esi, dword [ebp - 0x498]
cmp esi, eax
jb 0x40bb6d
sub esi, eax
lea ebx, [ebp - 0x410]
mov edi, dword [ebp - 0x49c]
mov dword [ebp - 0x418], ebx
add edi, eax
mov dword [ebp - 0x454], esi
cmp esi, 0xf
ja 0x40b5bf
cmp esi, 1
je 0x40af9b
test esi, esi
jne 0x40b360
mov eax, ebx
mov dword [ebp - 0x414], esi
mov byte [eax + esi], 0
mov eax, dword [ebp - 0x418]
mov edi, dword [ebp - 0x484]
cmp eax, ebx
je 0x40b851
lea esi, [ebp - 0x47c]
mov ecx, dword [ebp - 0x414]
mov edx, dword [ebp - 0x410]
cmp edi, esi
je 0x40b821
mov esi, dword [ebp - 0x47c]
mov dword [ebp - 0x484], eax
mov dword [ebp - 0x480], ecx
mov dword [ebp - 0x47c], edx
test edi, edi
je 0x40b833
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x410], esi
mov dword [ebp - 0x414], 0
mov byte [edi], 0
mov edx, dword [ebp - 0x418]
cmp edx, ebx
je 0x40a84d
mov eax, dword [ebp - 0x410]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
jmp 0x40a84d
mov edi, dword [eax + 4]
test edi, edi
je 0x40bb89
dec edi
lea eax, [ebp - 0x418]
lea ebx, [ebp - 0x410]
mov dword [ebp - 0x4c0], eax
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x454], edi
cmp edi, 0xf
ja 0x40a7d9
cmp edi, 1
jne 0x40a827
mov al, byte [esi + 1]
mov byte [ebp - 0x410], al
mov eax, ebx
mov dword [ebp - 0x414], edi
mov byte [eax + edi], 0
mov eax, dword [ebp + 0x10]
add eax, 8
mov edi, dword [eax - 8]
cmp edi, eax
mov eax, dword [ebp - 0x418]
je 0x40b4db
cmp eax, ebx
je 0x40b566
mov esi, dword [ebp + 0x10]
test edi, edi
mov dword [esi], eax
mov eax, dword [ebp - 0x414]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x410]
mov edx, dword [esi + 8]
mov dword [esi + 8], eax
je 0x40b4fa
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x410], edx
mov dword [ebp - 0x414], 0
mov byte [edi], 0
mov edx, dword [ebp - 0x418]
cmp edx, ebx
je 0x40a7c0
mov eax, dword [ebp - 0x410]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov dword [ebp - 0x4d0], 0
mov byte [ebp - 0x4ca], 0
mov eax, dword [ebp + 0x10]
jmp 0x40a379
mov ecx, eax
lea eax, [ebp - 0x454]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0047e350
push edx
push edx
mov dword [ebp - 0x418], eax
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x410], edx
inc esi
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edi, dword [ebp - 0x454]
mov eax, dword [ebp - 0x418]
jmp 0x40a73f
test edi, edi
je 0x40a73d
mov eax, ebx
jmp 0x40a805
lea eax, [ebp - 0x49c]
lea ecx, [ebp - 0x484]
mov dword [esp], eax
call fcn.0047e260
push ecx
mov dword [esp + 4], 0
mov dword [esp], 0x2e
lea ecx, [ebp - 0x484]
call fcn.00476460
cmp eax, 0xffffffff
push ebx
push ebx
je 0x40bc85
inc eax
mov esi, dword [ebp - 0x480]
cmp esi, eax
jb 0x40bc69
lea ebx, [ebp - 0x418]
sub esi, eax
mov dword [ebp - 0x4c0], ebx
mov edi, dword [ebp - 0x484]
lea ebx, [ebp - 0x410]
add edi, eax
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x454], esi
cmp esi, 0xf
ja 0x40af4a
cmp esi, 1
je 0x40aee4
test esi, esi
jne 0x40b359
mov eax, ebx
mov dword [ebp - 0x414], esi
mov byte [eax + esi], 0
mov eax, dword [ebp - 0x418]
mov edi, dword [ebp - 0x484]
cmp eax, ebx
je 0x40b778
lea esi, [ebp - 0x47c]
mov ecx, dword [ebp - 0x414]
mov edx, dword [ebp - 0x410]
cmp edi, esi
je 0x40b541
mov esi, dword [ebp - 0x47c]
mov dword [ebp - 0x484], eax
mov dword [ebp - 0x480], ecx
mov dword [ebp - 0x47c], edx
test edi, edi
je 0x40b553
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x410], esi
mov dword [ebp - 0x414], 0
mov byte [edi], 0
mov edx, dword [ebp - 0x418]
cmp edx, ebx
je 0x40a953
mov eax, dword [ebp - 0x410]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov eax, dword [ebp - 0x498]
mov ecx, dword [ebp - 0x480]
lea edi, [ebp - 0x464]
lea esi, [eax - 1]
mov dword [ebp - 0x46c], edi
sub esi, ecx
mov edi, dword [ebp - 0x49c]
cmp eax, esi
jae 0x40a97c
mov esi, eax
mov dword [ebp - 0x418], esi
cmp esi, 0xf
ja 0x40aef1
cmp esi, 1
je 0x40aed7
test esi, esi
jne 0x40b8b8
lea edi, [ebp - 0x46c]
lea eax, [ebp - 0x464]
mov dword [ebp - 0x4b0], edi
mov dword [ebp - 0x468], esi
mov byte [eax + esi], 0
mov eax, dword [0x4b606c]
mov dword [esp + 0xc], eax
mov eax, dword [0x4b6068]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0
mov ecx, dword [ebp - 0x4b0]
call fcn.0047bd90
lea esi, [ebp - 0x44c]
lea edi, [eax + 8]
mov dword [ebp - 0x454], esi
sub esp, 0x10
mov ecx, dword [eax]
mov dword [ebp - 0x4ac], edi
mov esi, dword [eax + 4]
cmp ecx, edi
je 0x40b7d2
mov dword [ebp - 0x454], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x44c], ecx
mov ecx, dword [eax + 4]
mov esi, dword [ebp - 0x4ac]
mov dword [ebp - 0x450], ecx
mov dword [eax + 4], 0
mov byte [eax + 8], 0
mov dword [eax], esi
mov ecx, dword [ebp - 0x450]
mov eax, 0x3fffffff
sub eax, ecx
cmp eax, 3
jbe 0x40badc
lea eax, [ebp - 0x454]
mov dword [ebp - 0x4e4], eax
mov ecx, eax
mov dword [esp + 4], 4
mov dword [esp], str..png
call fcn.0047e1c0
push edx
lea edi, [eax + 8]
push edx
mov dword [ebp - 0x418], ebx
mov ecx, dword [eax]
mov dword [ebp - 0x4ac], edi
mov esi, dword [eax + 4]
cmp ecx, edi
je 0x40b733
mov dword [ebp - 0x418], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x410], ecx
mov ecx, dword [eax + 4]
mov esi, dword [ebp - 0x4ac]
mov dword [ebp - 0x414], ecx
mov dword [eax], esi
mov byte [eax + 8], 0
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x418]
mov edi, dword [ebp - 0x49c]
cmp eax, ebx
je 0x40b6d9
lea esi, [ebp - 0x494]
mov ecx, dword [ebp - 0x414]
mov edx, dword [ebp - 0x410]
cmp edi, esi
je 0x40b51c
mov esi, dword [ebp - 0x494]
mov dword [ebp - 0x49c], eax
mov dword [ebp - 0x498], ecx
mov dword [ebp - 0x494], edx
test edi, edi
je 0x40b52e
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x410], esi
mov dword [ebp - 0x414], 0
mov byte [edi], 0
mov edx, dword [ebp - 0x418]
cmp edx, ebx
je 0x40ab39
mov eax, dword [ebp - 0x410]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov edx, dword [ebp - 0x454]
lea eax, [ebp - 0x44c]
cmp edx, eax
je 0x40ab5c
mov eax, dword [ebp - 0x44c]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov edx, dword [ebp - 0x46c]
lea eax, [ebp - 0x464]
cmp edx, eax
je 0x40ab7f
mov eax, dword [ebp - 0x464]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov eax, dword [ebp - 0x484]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
lea ecx, [ebp - 0x484]
mov dword [ebp - 0x4ac], eax
mov dword [esp + 4], 0
mov dword [esp], 0x2e
call fcn.00476460
cmp eax, 0xffffffff
push edi
push edi
je 0x40ae76
mov edx, dword [ebp - 0x484]
lea eax, [edx + eax + 1]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
lea ecx, [ebp - 0x484]
mov dword [ebp - 0x4b0], eax
mov dword [esp + 4], 0
mov dword [esp], 0x2c
call fcn.00476460
cmp eax, 0xffffffff
push ecx
push ecx
je 0x40ad77
inc eax
mov esi, dword [ebp - 0x480]
cmp esi, eax
jb 0x40bd1b
sub esi, eax
mov edi, dword [ebp - 0x484]
add edi, eax
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x454], esi
cmp esi, 0xf
ja 0x40b308
cmp esi, 1
je 0x40b8ab
test esi, esi
jne 0x40b383
mov eax, ebx
mov dword [ebp - 0x414], esi
mov byte [eax + esi], 0
mov eax, dword [ebp - 0x418]
mov edi, dword [ebp - 0x484]
cmp eax, ebx
je 0x40b8f4
lea esi, [ebp - 0x47c]
mov ecx, dword [ebp - 0x414]
mov edx, dword [ebp - 0x410]
cmp edi, esi
je 0x40b8cf
mov esi, dword [ebp - 0x47c]
mov dword [ebp - 0x484], eax
mov dword [ebp - 0x480], ecx
mov dword [ebp - 0x47c], edx
test edi, edi
je 0x40b8e1
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x410], esi
mov dword [ebp - 0x414], 0
mov byte [edi], 0
mov edx, dword [ebp - 0x418]
cmp edx, ebx
je 0x40acc4
mov eax, dword [ebp - 0x410]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
mov eax, dword [ebp - 0x484]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
lea ecx, [ebp - 0x484]
mov dword [ebp - 0x434], eax
mov dword [esp + 4], 0
mov dword [esp], 0x2c
call fcn.00476460
cmp eax, 0xffffffff
push esi
push esi
je 0x40ad77
inc eax
mov esi, dword [ebp - 0x480]
cmp esi, eax
jb 0x40bac0
sub esi, eax
mov edi, dword [ebp - 0x484]
add edi, eax
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x454], esi
cmp esi, 0xf
ja 0x40b95b
cmp esi, 1
je 0x40b94e
test esi, esi
jne 0x40b387
mov eax, ebx
mov dword [ebp - 0x414], esi
mov byte [eax + esi], 0
mov eax, dword [ebp - 0x418]
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov dword [ebp - 0x430], eax
mov eax, dword [ebp - 0x418]
cmp eax, ebx
je 0x40ad77
mov ebx, dword [ebp - 0x410]
mov dword [esp], eax
lea edx, [ebx + 1]
mov dword [esp + 4], edx
call fcn.00480000
mov eax, dword [ebp - 0x49c]
mov dword [esp], eax
mov ecx, dword [ebp - 0x4c8]
call fcn.0040a200
test al, al
push edx
je 0x40bc0f
mov ebx, dword [0x4b6040]
xor edx, edx
mov ecx, dword [0x486064]
mov eax, ebx
div ecx
mov esi, eax
cmp dword [ebp - 0x4b0], 0xffffffff
je 0x40ae9f
mov ebx, dword [ebp - 0x4b0]
cmp esi, ebx
jle 0x40bbab
xor edx, edx
mov eax, dword [0x4b6044]
div ecx
mov esi, dword [ebp - 0x4ac]
cmp eax, esi
jle 0x40bbab
imul esi, ecx
imul ebx, ecx
imul ecx, ecx
mov dword [ebp - 0x4dc], esi
mov dword [ebp - 0x4e0], ebx
cmp ecx, 0x1fffffff
jg 0x40bd57
shl ecx, 2
mov dword [esp], ecx
call fcn.00480010
mov ebx, dword [0x486064]
mov dword [ebp - 0x4d8], eax
test ebx, ebx
jle 0x40b3aa
mov al, byte [0x4b6049]
mov ecx, dword [0x4b603c]
shr al, 3
mov edx, dword [0x4b6040]
mov esi, eax
mov al, byte [0x4b6048]
and esi, 0xff
test al, al
mov dword [ebp - 0x4b8], esi
je 0x40b439
cmp al, 1
je 0x40b5f4
cmp al, 2
je 0x40afa8
mov dword [esp + 8], str.Unsupported_input_image_format
mov dword [esp + 4], str.image_writer_t::block_getpix
mov eax, dword [0x4b61c0]
mov dword [esp], eax
call fcn.00425880
mov eax, dword [ebp - 0x49c]
mov dword [esp], eax
mov ecx, dword [ebp - 0x4c8]
call fcn.0040a200
test al, al
push esi
je 0x40bc0f
mov ecx, dword [0x486064]
mov ebx, dword [0x4b6040]
mov eax, ebx
xor edx, edx
div ecx
mov esi, eax
xor edx, edx
mov eax, dword [ebp - 0x4ac]
div esi
mov dword [ebp - 0x4b0], edx
mov eax, dword [0x4b6044]
xor edx, edx
div ecx
mov ebx, eax
xor edx, edx
mov eax, dword [ebp - 0x4ac]
div ebx
mov dword [ebp - 0x4ac], eax
jmp 0x40adb5
mov al, byte [edi]
mov byte [ebp - 0x464], al
jmp 0x40a99c
mov al, byte [edi]
mov byte [ebp - 0x410], al
jmp 0x40a8c3
lea eax, [ebp - 0x46c]
mov dword [ebp - 0x4b0], eax
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x4c0]
mov ecx, eax
mov dword [esp], edx
call fcn.0047e350
push edx
push edx
mov dword [ebp - 0x46c], eax
mov edx, dword [ebp - 0x418]
mov dword [ebp - 0x464], edx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov esi, dword [ebp - 0x418]
mov eax, dword [ebp - 0x46c]
jmp 0x40a9ae
lea eax, [ebp - 0x454]
mov dword [esp + 4], 0
mov dword [esp], eax
mov ecx, dword [ebp - 0x4c0]
call fcn.0047e350
push edx
push edx
mov dword [ebp - 0x418], eax
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x410], edx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov esi, dword [ebp - 0x454]
mov eax, dword [ebp - 0x418]
jmp 0x40a8c5
mov al, byte [edi]
mov byte [ebp - 0x410], al
jmp 0x40a65e
mov eax, dword [ebp - 0x4dc]
mov esi, dword [ebp - 0x4e0]
imul eax, edx
add eax, esi
mov esi, dword [ebp - 0x4b8]
imul eax, esi
add eax, ecx
xor edi, edi
mov dword [ebp - 0x4b0], eax
mov eax, edx
imul eax, esi
lea esi, [ebx*4]
mov dword [ebp - 0x4ac], eax
mov dword [ebp - 0x4b4], esi
lea esi, [esi]
mov eax, dword [ebp - 0x4d8]
mov edx, dword [ebp - 0x4b0]
xor ecx, ecx
mov dword [ebp - 0x4bc], edi
lea esi, [eax + edi*4]
nop
movzx edi, byte [edx]
xor eax, eax
and edi, 0xff
mov al, byte [edx + 1]
inc ecx
shl edi, 0x10
shl eax, 8
or eax, edi
movzx edi, byte [edx + 2]
and edi, 0xff
or eax, edi
mov dword [esi], eax
mov eax, dword [ebp - 0x4ac]
add edx, eax
mov eax, dword [ebp - 0x4b4]
add esi, eax
cmp ecx, ebx
jne 0x40b000
mov eax, dword [ebp - 0x4b0]
mov edi, dword [ebp - 0x4bc]
mov esi, dword [ebp - 0x4b8]
inc edi
add eax, esi
cmp edi, ebx
mov dword [ebp - 0x4b0], eax
jne 0x40afe8
mov dword [ebp - 0x454], ebx
mov dword [ebp - 0x44c], ebx
mov dword [ebp - 0x450], 0
mov dword [ebp - 0x448], 0
mov edi, dword [ebp - 0x4d8]
mov dword [ebp - 0x4bc], ebx
mov byte [ebp - 0x4c9], 0
xor edx, edx
mov byte [ebp - 0x4cb], 0
mov dword [ebp - 0x4ac], 0
mov byte [ebp - 0x4cc], 0
mov byte [ebp - 0x4d1], 0
mov byte [ebp - 0x4c4], 0
xor esi, esi
mov dword [ebp - 0x4b8], ebx
lea esi, cs:[esi]
xor eax, eax
mov dword [ebp - 0x4b0], edx
mov edx, dword [edi + eax*4]
mov ecx, edx
and ecx, 0xffffff
cmp ecx, 0xe7ffff
je 0x40b140
cmp edx, 0xf7ffffff
ja 0x40b140
cmp dword [ebp - 0x4bc], eax
jle 0x40b0f8
mov dword [ebp - 0x4bc], eax
mov byte [ebp - 0x4d1], 1
cmp dword [ebp - 0x4b8], esi
jle 0x40b10d
mov dword [ebp - 0x4b8], esi
mov byte [ebp - 0x4cc], 1
cmp dword [ebp - 0x4ac], eax
jge 0x40b122
mov dword [ebp - 0x4ac], eax
mov byte [ebp - 0x4cb], 1
mov edx, dword [ebp - 0x4b0]
mov byte [ebp - 0x4c4], 1
cmp esi, edx
jle 0x40b140
mov dword [ebp - 0x4b0], esi
mov byte [ebp - 0x4c9], 1
inc eax
cmp eax, ebx
jne 0x40b0c8
inc esi
mov eax, dword [ebp - 0x4b4]
add edi, eax
mov edx, dword [ebp - 0x4b0]
cmp esi, ebx
jne 0x40b0c0
mov eax, dword [ebp - 0x4b8]
cmp byte [ebp - 0x4c9], 0
mov dword [ebp - 0x4b4], eax
je 0x40b50d
mov dword [ebp - 0x448], edx
cmp byte [ebp - 0x4cb], 0
je 0x40b6ca
mov eax, dword [ebp - 0x4ac]
mov dword [ebp - 0x450], eax
cmp byte [ebp - 0x4cc], 0
je 0x40b846
mov eax, dword [ebp - 0x4b4]
mov dword [ebp - 0x44c], eax
cmp byte [ebp - 0x4d1], 0
je 0x40b1c4
mov eax, dword [ebp - 0x4bc]
mov dword [ebp - 0x454], eax
mov ebx, eax
cmp byte [ebp - 0x4c4], 0
je 0x40b3d2
mov eax, dword [ebp - 0x4ac]
mov esi, dword [ebp - 0x4b4]
sub eax, ebx
inc eax
mov dword [ebp - 0x4ac], eax
mov eax, dword [ebp - 0x4b0]
sub eax, esi
inc eax
mov dword [ebp - 0x4b0], eax
mov eax, dword [ebp - 0x4d8]
mov dword [esp], eax
call fcn.0047ffe0
mov eax, dword [ebp - 0x4b4]
mov ecx, dword [ebp - 0x430]
mov edx, dword [ebp - 0x434]
add eax, ecx
add ebx, edx
mov dword [ebp - 0x4b4], eax
mov dword [ebp - 0x430], eax
mov eax, dword [ebp - 0x4ac]
mov edi, ebx
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp - 0x4b0]
mov dword [ebp - 0x434], ebx
mov dword [ebp - 0x428], eax
test eax, eax
jg 0x40b3fa
xor ebx, ebx
xor esi, esi
cmp byte [ebp - 0x4ca], 0
mov edx, dword [0x4b61c0]
mov eax, 0x488207
je 0x40b26a
mov eax, 0x488203
mov dword [esp + 0x30], eax
mov eax, dword [ebp - 0x4b0]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp - 0x4ac]
mov dword [esp + 0x28], eax
mov eax, dword [ebp - 0x4b4]
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
mov eax, dword [ebp - 0x4dc]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x4e0]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x49c]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 8], str.image__3u____30s___20s__5u__5u__5u__5u__5u__6u__4s
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x488202
mov dword [esp], edx
call fcn.00425460
mov edx, dword [ebp - 0x484]
lea eax, [ebp - 0x47c]
cmp edx, eax
je 0x40b2f9
mov eax, dword [ebp - 0x47c]
mov dword [esp], edx
inc eax
mov dword [esp + 4], eax
call fcn.00480000
lea eax, [ebx + ebx + 0xa]
mov ecx, dword [ebp - 0x4c0]
jmp 0x40a458
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x4e4]
mov dword [esp], eax
mov ecx, dword [ebp - 0x4c0]
call fcn.0047e350
push edx
push edx
mov dword [ebp - 0x418], eax
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x410], edx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov esi, dword [ebp - 0x454]
mov eax, dword [ebp - 0x418]
jmp 0x40ac36
mov eax, ebx
jmp 0x40af7a
mov eax, ebx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov esi, dword [ebp - 0x454]
mov eax, dword [ebp - 0x418]
jmp 0x40a660
mov eax, ebx
jmp 0x40b338
mov eax, ebx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov esi, dword [ebp - 0x454]
mov eax, dword [ebp - 0x418]
jmp 0x40ad3a
mov dword [ebp - 0x450], 0
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x4b0], 0
mov dword [ebp - 0x4ac], 0
mov dword [ebp - 0x454], 1
mov dword [ebp - 0x44c], 1
mov dword [ebp - 0x4b4], 1
mov ebx, 1
jmp 0x40b1f5
mov eax, dword [ebp - 0x4c0]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4e4]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4dc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4e0]
mov dword [esp], eax
call fcn.00409cf0
mov ebx, dword [ebp - 0x418]
mov esi, eax
mov dword [ebp - 0x438], ebx
jmp 0x40b251
mov eax, dword [ebp - 0x4dc]
mov esi, dword [ebp - 0x4e0]
imul eax, edx
add eax, esi
mov esi, dword [ebp - 0x4b8]
imul eax, esi
add eax, ecx
mov dword [ebp - 0x4b0], eax
mov eax, edx
imul eax, esi
lea esi, [ebx*4]
xor edx, edx
mov dword [ebp - 0x4b4], esi
mov dword [ebp - 0x4ac], eax
lea esi, [esi]
mov eax, dword [ebp - 0x4d8]
mov esi, dword [ebp - 0x4b0]
xor ecx, ecx
mov dword [ebp - 0x4bc], edx
lea edi, [eax + edx*4]
nop
xor edx, edx
inc ecx
mov dl, byte [esi]
mov eax, edx
shl eax, 8
add eax, edx
shl eax, 8
add eax, edx
mov dword [edi], eax
mov eax, dword [ebp - 0x4ac]
add esi, eax
mov eax, dword [ebp - 0x4b4]
add edi, eax
cmp ecx, ebx
jne 0x40b490
mov edi, dword [ebp - 0x4b0]
mov edx, dword [ebp - 0x4bc]
mov esi, dword [ebp - 0x4b8]
inc edx
add edi, esi
cmp edx, ebx
mov dword [ebp - 0x4b0], edi
jne 0x40b478
jmp 0x40b058
cmp eax, ebx
je 0x40b566
mov esi, dword [ebp + 0x10]
mov dword [esi], eax
mov eax, dword [ebp - 0x414]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x410]
mov dword [esi + 8], eax
mov dword [ebp - 0x418], ebx
lea ebx, [ebp - 0x410]
mov edi, ebx
jmp 0x40a796
mov dword [ebp - 0x4b0], 0
jmp 0x40b17b
mov dword [ebp - 0x49c], eax
mov dword [ebp - 0x498], ecx
mov dword [ebp - 0x494], edx
mov dword [ebp - 0x418], ebx
lea ebx, [ebp - 0x410]
mov edi, ebx
jmp 0x40ab0f
mov dword [ebp - 0x484], eax
mov dword [ebp - 0x480], ecx
mov dword [ebp - 0x47c], edx
mov dword [ebp - 0x418], ebx
lea ebx, [ebp - 0x410]
mov edi, ebx
jmp 0x40a929
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40b5aa
cmp eax, 1
je 0x40b990
mov esi, ebx
cmp eax, 4
jae 0x40b9a8
xor edx, edx
test al, 2
je 0x40b595
mov dx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x40b59f
mov al, byte [esi + edx]
mov byte [edi + edx], al
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp - 0x414]
mov edi, dword [esi]
mov esi, dword [ebp + 0x10]
mov dword [esi + 4], eax
mov byte [edi + eax], 0
mov edi, dword [ebp - 0x418]
jmp 0x40a796
lea eax, [ebp - 0x454]
mov dword [esp + 4], 0
mov dword [esp], eax
lea ecx, [ebp - 0x418]
call fcn.0047e350
push edx
push edx
mov dword [ebp - 0x418], eax
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x410], edx
jmp 0x40b362
mov eax, dword [ebp - 0x4dc]
mov esi, dword [ebp - 0x4e0]
imul eax, edx
add eax, esi
mov esi, dword [ebp - 0x4b8]
imul eax, esi
imul esi, edx
add eax, ecx
mov edi, esi
lea esi, [ebx*4]
mov dword [ebp - 0x4bc], eax
mov dword [ebp - 0x4b4], esi
xor eax, eax
mov dword [ebp - 0x4b0], ebx
mov ebx, dword [ebp - 0x4d8]
xor ecx, ecx
mov edx, dword [ebp - 0x4bc]
mov dword [ebp - 0x4c4], eax
lea ebx, [ebx + eax*4]
mov dword [ebp - 0x4ac], ecx
lea esi, [esi]
xor eax, eax
mov al, byte [edx]
shl eax, 0x10
mov ecx, eax
mov ax, word [edx + 1]
rol ax, 8
and eax, 0xffff
add eax, ecx
xor ecx, ecx
mov cl, byte [edx + 3]
add edx, edi
shl ecx, 0x18
add eax, ecx
xor eax, 0xff000000
mov dword [ebx], eax
mov eax, dword [ebp - 0x4ac]
inc eax
add ebx, esi
mov dword [ebp - 0x4ac], eax
mov eax, dword [ebp - 0x4ac]
cmp dword [ebp - 0x4b0], eax
jne 0x40b650
mov ecx, dword [ebp - 0x4bc]
mov eax, dword [ebp - 0x4c4]
mov edx, dword [ebp - 0x4b8]
inc eax
add ecx, edx
cmp dword [ebp - 0x4b0], eax
mov dword [ebp - 0x4bc], ecx
jne 0x40b630
mov ebx, dword [ebp - 0x4b0]
jmp 0x40b058
mov dword [ebp - 0x4ac], 0
jmp 0x40b194
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40b71e
cmp eax, 1
je 0x40b9e5
mov esi, ebx
cmp eax, 4
jae 0x40b9fe
xor edx, edx
test al, 2
je 0x40b708
mov dx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x40b712
mov al, byte [esi + edx]
mov byte [edi + edx], al
mov eax, dword [ebp - 0x414]
mov edi, dword [ebp - 0x49c]
mov dword [ebp - 0x498], eax
mov byte [edi + eax], 0
mov edi, dword [ebp - 0x418]
jmp 0x40ab0f
inc esi
mov edi, ebx
mov edx, esi
mov esi, dword [ebp - 0x4ac]
cmp edx, 4
jb 0x40b752
mov esi, edx
shr esi, 2
mov ecx, esi
mov esi, dword [ebp - 0x4ac]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
test dl, 2
je 0x40b764
mov cx, word [esi]
mov word [edi], cx
mov ecx, 2
and edx, 1
je 0x40aa99
mov dl, byte [esi + ecx]
mov byte [edi + ecx], dl
jmp 0x40aa99
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40b7bd
cmp eax, 1
je 0x40b9cc
mov esi, ebx
cmp eax, 4
jae 0x40ba3b
xor edx, edx
test al, 2
je 0x40b7a7
mov dx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x40b7b1
mov al, byte [esi + edx]
mov byte [edi + edx], al
mov eax, dword [ebp - 0x414]
mov edi, dword [ebp - 0x484]
mov dword [ebp - 0x480], eax
mov byte [edi + eax], 0
mov edi, dword [ebp - 0x418]
jmp 0x40a929
lea edx, [esi + 1]
lea edi, [ebp - 0x44c]
mov dword [ebp - 0x4b4], edx
mov esi, dword [ebp - 0x4ac]
cmp edx, 4
jb 0x40b7f3
shr edx, 2
mov ecx, edx
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
test byte [ebp - 0x4b4], 2
je 0x40b809
mov cx, word [esi]
mov word [edi], cx
mov ecx, 2
test byte [ebp - 0x4b4], 1
je 0x40aa18
mov dl, byte [esi + ecx]
mov byte [edi + ecx], dl
jmp 0x40aa18
mov dword [ebp - 0x484], eax
mov dword [ebp - 0x480], ecx
mov dword [ebp - 0x47c], edx
mov dword [ebp - 0x418], ebx
lea ebx, [ebp - 0x410]
mov edi, ebx
jmp 0x40a6c4
mov dword [ebp - 0x4b4], ebx
jmp 0x40b1ad
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40b896
cmp eax, 1
je 0x40ba22
mov esi, ebx
cmp eax, 4
jae 0x40ba5f
xor edx, edx
test al, 2
je 0x40b880
mov dx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x40b88a
mov al, byte [esi + edx]
mov byte [edi + edx], al
mov eax, dword [ebp - 0x414]
mov edi, dword [ebp - 0x484]
mov dword [ebp - 0x480], eax
mov byte [edi + eax], 0
mov edi, dword [ebp - 0x418]
jmp 0x40a6c4
mov al, byte [edi]
mov byte [ebp - 0x410], al
jmp 0x40ac34
lea edx, [ebp - 0x46c]
lea eax, [ebp - 0x464]
mov dword [ebp - 0x4b0], edx
jmp 0x40af29
mov dword [ebp - 0x484], eax
mov dword [ebp - 0x480], ecx
mov dword [ebp - 0x47c], edx
mov dword [ebp - 0x418], ebx
lea ebx, [ebp - 0x410]
mov edi, ebx
jmp 0x40ac9a
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40b939
cmp eax, 1
je 0x40baa7
mov esi, ebx
cmp eax, 4
jae 0x40ba83
xor edx, edx
test al, 2
je 0x40b923
mov dx, word [esi]
mov word [edi], dx
mov edx, 2
test al, 1
je 0x40b92d
mov al, byte [esi + edx]
mov byte [edi + edx], al
mov eax, dword [ebp - 0x414]
mov edi, dword [ebp - 0x484]
mov dword [ebp - 0x480], eax
mov byte [edi + eax], 0
mov edi, dword [ebp - 0x418]
jmp 0x40ac9a
mov al, byte [edi]
mov byte [ebp - 0x410], al
jmp 0x40ad38
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x4e4]
mov dword [esp], eax
mov ecx, dword [ebp - 0x4c0]
call fcn.0047e350
push ecx
push ecx
mov dword [ebp - 0x418], eax
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x410], edx
jmp 0x40b389
mov al, byte [ebp - 0x410]
mov esi, dword [ebp + 0x10]
mov byte [edi], al
mov eax, dword [ebp - 0x414]
mov edi, dword [esi]
jmp 0x40b5aa
test edi, 1
jne 0x40bb30
test edi, 2
jne 0x40bb1b
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x40b584
mov al, byte [ebp - 0x410]
mov byte [edi], al
mov eax, dword [ebp - 0x414]
mov edi, dword [ebp - 0x484]
jmp 0x40b7bd
mov al, byte [ebp - 0x410]
mov byte [edi], al
mov eax, dword [ebp - 0x414]
mov edi, dword [ebp - 0x49c]
jmp 0x40b71e
test edi, 1
jne 0x40bb09
test edi, 2
jne 0x40baf4
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x40b6f7
mov al, byte [ebp - 0x410]
mov byte [edi], al
mov eax, dword [ebp - 0x414]
mov edi, dword [ebp - 0x484]
jmp 0x40b896
test edi, 1
jne 0x40bd09
test edi, 2
jne 0x40bcf4
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x40b796
test edi, 1
jne 0x40bd37
test edi, 2
jne 0x40bcdf
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x40b86f
test edi, 1
jne 0x40bb5b
test edi, 2
jne 0x40bb46
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x40b912
mov al, byte [ebp - 0x410]
mov byte [edi], al
mov eax, dword [ebp - 0x414]
mov edi, dword [ebp - 0x484]
jmp 0x40b939
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 0x48820a
mov dword [esp], 0x488220
call fcn.0047fa70
lea eax, [ebp - 0x454]
mov dword [esp], 0x48827c
mov dword [ebp - 0x4e4], eax
call fcn.004832e4
mov dx, word [esi]
add edi, 2
mov word [edi - 2], dx
add esi, 2
sub eax, 2
jmp 0x40ba16
mov cl, byte [ebx]
inc edi
mov byte [edi - 1], cl
lea esi, [ebp - 0x40f]
dec eax
jmp 0x40ba0a
mov dx, word [esi]
add edi, 2
mov word [edi - 2], dx
add esi, 2
sub eax, 2
jmp 0x40b9c0
mov cl, byte [ebp - 0x410]
inc edi
mov byte [edi - 1], cl
lea esi, [ebp - 0x40f]
dec eax
jmp 0x40b9b4
mov dx, word [esi]
add edi, 2
mov word [edi - 2], dx
add esi, 2
sub eax, 2
jmp 0x40ba9b
mov cl, byte [ebx]
inc edi
mov byte [edi - 1], cl
lea esi, [ebp - 0x40f]
dec eax
jmp 0x40ba8f
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 0x48820a
mov dword [esp], 0x488220
call fcn.0047fa70
xor ecx, ecx
mov dword [esp + 8], 1
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 0x48820a
mov dword [esp], 0x488220
call fcn.0047fa70
mov eax, dword [ebp - 0x484]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x49c]
mov dword [esp + 4], str.invalid_image_number_in__s._s
mov dword [esp + 8], eax
mov ebx, dword [ebp - 0x4c0]
mov dword [esp], ebx
call fcn.00471a30
mov dword [esp], 0x30
call fcn.004800b0
mov dword [esp + 4], ebx
mov dword [esp], str.image_writer_t
mov ecx, eax
mov esi, eax
call fcn.00473610
push eax
push eax
mov dword [esp + 8], 0x4736c0
mov dword [esp + 4], 0x495520
mov dword [esp], esi
call fcn.00480640
mov eax, dword [ebp - 0x49c]
mov dword [esp + 4], str.cannot_open__s
mov dword [esp + 8], eax
mov ebx, dword [ebp - 0x4c0]
mov dword [esp], ebx
call fcn.00471a30
mov dword [esp], 0x30
call fcn.004800b0
mov dword [esp + 4], ebx
mov dword [esp], str.image_writer_t
mov ecx, eax
mov esi, eax
call fcn.00473610
push ebx
push ebx
mov dword [esp + 8], 0x4736c0
mov dword [esp + 4], 0x495520
mov dword [esp], esi
call fcn.00480640
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 0x48820a
mov dword [esp], 0x488220
call fcn.0047fa70
mov eax, dword [ebp - 0x49c]
lea ebx, [ebp - 0x418]
mov dword [esp + 8], eax
mov dword [esp + 4], str.no_image_number_in__s
mov dword [esp], ebx
call fcn.00471a30
mov dword [esp], 0x30
call fcn.004800b0
mov dword [esp + 4], ebx
mov dword [esp], str.image_writer_t
mov ecx, eax
mov esi, eax
call fcn.00473610
push ecx
push ecx
mov dword [esp + 8], 0x4736c0
mov dword [esp + 4], 0x495520
mov dword [esp], esi
call fcn.00480640
mov dx, word [esi]
add edi, 2
mov word [edi - 2], dx
add esi, 2
sub eax, 2
jmp 0x40ba77
mov dx, word [esi]
add edi, 2
mov word [edi - 2], dx
add esi, 2
sub eax, 2
jmp 0x40ba53
mov cl, byte [ebx]
inc edi
mov byte [edi - 1], cl
lea esi, [ebp - 0x40f]
dec eax
jmp 0x40ba47
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 0x48820a
mov dword [esp], 0x488220
call fcn.0047fa70
mov cl, byte [ebx]
inc edi
mov byte [edi - 1], cl
lea esi, [ebp - 0x40f]
dec eax
jmp 0x40ba6b
jmp 0x4811dc