Function at 0x401080
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6b8
push esi
mov esi, ecx
mov eax, dword [esi + 0x598d4]
movsx ecx, byte [eax + 0x65]
mov dword [esp + 0x38], ecx
xor ecx, ecx
lea edx, [eax + 0x60]
mov dword [esi + 0x866c], edx
mov dword [esi + 0x488], ecx
mov dword [esi + 0x360], ecx
mov dword [esi + 0xc], ecx
mov edx, dword [eax + 0x48]
cmp edx, ecx
push edi
mov dword [esp + 0x5c], esi
je 0x4010c8
add edx, 4
jmp 0x4010cd
mov edx, 0x6b6e10
mov dword [esi + 8], edx
mov eax, dword [eax + 0x48]
cmp eax, ecx
je 0x4010dc
add eax, 4
jmp 0x4010de
xor eax, eax
push 0x6953fc
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ecx
mov byte [esp + 0x71], cl
mov byte [esp + 0x70], cl
mov dword [esp + 0x78], ecx
push eax
lea ecx, [esp + 0x6c]
call fcn.004a0820
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x68]
test eax, eax
mov dword [esi], eax
jne 0x401131
mov esi, dword [esi + 0x598d4]
add esi, 0x48
mov esi, dword [esi]
test esi, esi
lea eax, [esi + 4]
jne 0x401126
mov eax, 0x6b6e10
push eax
call fcn.004878c9
jmp 0x4013c2
mov eax, dword [esi + 0x598d4]
mov cl, byte [eax + 0x6c]
test cl, cl
je 0x40118b
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x68]
push edx
call fcn.004a1630
mov eax, dword [esp + 0x70]
push 0
push 0
push eax
call fcn.00487810
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
mov edi, dword [esi + 0x598d4]
push ecx
push edx
add edi, 0x68
push str._016I64x
push edi
call fcn.00403a60
push 0
push 0
push str._016I64x
push edi
call fcn.00403a80
add esp, 0x34
mov ecx, esi
call fcn.00408870
fld dword [esi + 0x8578]
mov ecx, dword [esi + 0x39c]
fcomp qword [0x65c310]
xor eax, eax
xor edx, edx
cmp ecx, edx
sete al
mov ecx, 0x44800000
mov dword [esp + 0x60], eax
fnstsw ax
test ah, 1
jne 0x4011d0
fld dword [esi + 0x8578]
fcomp qword [0x65c308]
fnstsw ax
test ah, 0x41
jnp 0x4011f4
mov dword [esi + 0x854c], edx
mov dword [esi + 0x8548], edx
mov dword [esi + 0x8584], ecx
mov dword [esi + 0x8580], ecx
mov dword [esi + 0x857c], ecx
mov dword [esi + 0x8578], ecx
fld dword [esi + 0x8580]
fcomp qword [0x65c310]
fnstsw ax
test ah, 1
jne 0x40121a
fld dword [esi + 0x8580]
fcomp qword [0x65c308]
fnstsw ax
test ah, 0x41
jnp 0x40123e
mov dword [esi + 0x854c], edx
mov dword [esi + 0x8548], edx
mov dword [esi + 0x8584], ecx
mov dword [esi + 0x8580], ecx
mov dword [esi + 0x857c], ecx
mov dword [esi + 0x8578], ecx
mov eax, dword [esi + 0x450]
add eax, 0xe10
cdq
mov ecx, 0x168
idiv ecx
sub edx, 0x5a
je 0x401278
sub edx, 0x5a
je 0x40126c
sub edx, 0x5a
jne 0x401282
mov dword [esi + 0x450], 5
jmp 0x401282
mov dword [esi + 0x450], 3
jmp 0x401282
mov dword [esi + 0x450], 6
fld qword [esi + 0x460]
movzx edx, word [esi + 0x43e]
fcomp qword [0x65c300]
movzx edi, word [esi + 0x43c]
mov dword [esp + 0x10], edx
fnstsw ax
test ah, 5
mov dword [esp + 0x18], edi
jp 0x4012c6
fild dword [esp + 0x18]
fdiv qword [esi + 0x460]
fadd qword [0x65c2f8]
call fcn.00487bd0
mov dword [esp + 0x18], eax
jmp 0x4012f2
fld qword [esi + 0x460]
fcomp qword [0x65c300]
fnstsw ax
test ah, 0x41
jne 0x4012f2
fild dword [esp + 0x10]
fmul qword [esi + 0x460]
fadd qword [0x65c2f8]
call fcn.00487bd0
mov dword [esp + 0x10], eax
cmp word [esi + 0x44a], 0
je 0x40133d
fld qword [0x65c2f8]
movzx eax, word [esi + 0x44a]
fsqrt
mov dword [esp + 0x1c], eax
fdivr dword [0x65c2f4]
fild dword [esp + 0x1c]
fmul st(1)
call fcn.00487bd0
mov dword [esp + 0x10], eax
sub edi, dword [esp + 0x1c]
mov dword [esp + 0x20], edi
fild dword [esp + 0x20]
fmul st(1)
call fcn.00487bd0
fstp st(0)
mov dword [esp + 0x18], eax
mov ecx, dword [esi + 0x598d4]
mov al, byte [ecx + 0x65]
test al, al
je 0x401354
cmp word [esi + 0x44a], 0
je 0x401369
test byte [esi + 0x450], 4
je 0x401369
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edx, eax
jmp 0x401371
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40137a
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x401383
mov dword [eax], edx
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x401435
mov eax, dword [esi + 0x344]
xor ecx, ecx
test eax, eax
sete cl
test ecx, ecx
mov dword [esp + 0x60], ecx
je 0x4013f5
mov edx, dword [esi + 8]
push edx
push str._s_has_no_thumbnail._n
push 0x69aee0
call fcn.00487674
add esp, 0xc
mov ecx, dword [esi]
push ecx
call fcn.004875f7
mov eax, dword [esp + 0x68]
add esp, 4
test eax, eax
je 0x4013e1
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4013ea
lea ecx, [esp + 0x64]
call fcn.004a11c0
lea ecx, [esp + 0x64]
call fcn.004a0a50
or eax, 0xffffffff
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esi + 0x798dc]
test ecx, ecx
je 0x4014fa
mov dword [esi + 0x798d8], ecx
mov cx, word [esi + 0x44c]
mov dword [esi + 0x340], eax
mov ax, word [esi + 0x44e]
mov word [esi + 0x43c], ax
mov word [esi + 0x43e], cx
mov dword [esi + 0x330], 0
cmp dword [esi + 0x798d8], 0x403af0
jne 0x401473
xor eax, eax
mov ax, word [esi + 0x43c]
xor ecx, ecx
mov cl, al
xor edx, edx
and ecx, 1
add ecx, eax
xor eax, eax
mov ax, word [esi + 0x43e]
mov dl, al
mov word [esi + 0x43c], cx
and edx, 1
add edx, eax
mov word [esi + 0x43e], dx
mov eax, dword [esi + 0x39c]
test eax, eax
jne 0x4014a1
mov eax, dword [esi + 8]
push eax
push str.Cannot_decode_file__s_n
push 0x69aee0
call fcn.00487674
mov eax, dword [esi + 0x39c]
add esp, 0xc
test eax, eax
je 0x4013ba
mov eax, dword [esi + 0x330]
test eax, eax
je 0x40150d
mov eax, dword [esi + 0x8534]
test eax, eax
jne 0x4014f3
fld dword [esi + 0x8530]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jp 0x4014f3
mov eax, dword [esi + 0x468]
test eax, eax
jne 0x4014f3
mov ecx, dword [esi + 0x46c]
mov eax, 0x3ff00000
cmp ecx, eax
jne 0x4014f3
mov ecx, dword [esi + 0x478]
test ecx, ecx
jne 0x4014f3
cmp dword [esi + 0x47c], eax
je 0x40150d
mov eax, 1
jmp 0x40150f
mov edx, dword [esi]
push 0
push eax
push edx
call fcn.00487810
add esp, 0xc
jmp 0x402e87
xor eax, eax
movzx edx, word [esi + 0x43c]
movzx edi, word [esi + 0x43e]
xor ecx, ecx
mov cx, ax
mov word [esi + 0x444], ax
mov eax, dword [esi + 0x8600]
add edx, ecx
add edi, ecx
sar edi, cl
sar edx, cl
test eax, eax
mov dword [esp + 0x3c], edi
mov word [esi + 0x446], dx
mov word [esi + 0x448], di
jne 0x402e87
mov eax, dword [esi + 0x8550]
test eax, eax
je 0x40159d
fld dword [esi + 0x8598]
lea eax, [esi + 0x8598]
fcomp qword [0x65c2e8]
mov dword [esp + 0x20], eax
fnstsw ax
test ah, 0x41
jne 0x40159d
mov eax, dword [esp + 0x5c]
lea edi, [esi + 0x85c8]
mov esi, dword [esp + 0x20]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x3c]
mov dword [eax + 0x38c], 0
mov esi, eax
xor ecx, ecx
mov cx, di
movzx edx, dx
push 8
imul ecx, edx
push ecx
call fcn.004874ba
add esp, 8
test eax, eax
mov dword [esi + 0x488], eax
jne 0x4015d8
mov eax, dword [esi + 8]
push str.main__
push eax
push str._s:_Out_of_memory_in__s_n
push 0x69aee0
call fcn.00487674
add esp, 0x10
mov eax, dword [esi + 0x354]
test eax, eax
je 0x40160d
push eax
call fcn.00487380
add esp, 4
test eax, eax
mov dword [esi + 0xc], eax
jne 0x40160d
mov ecx, dword [esi + 8]
push str.main__
push ecx
push str._s:_Out_of_memory_in__s_n
push 0x69aee0
call fcn.00487674
add esp, 0x10
mov eax, dword [esi + 0x8544]
test eax, eax
je 0x40163b
mov edx, dword [esi + 8]
push edx
lea eax, [esi + 0x255]
push eax
lea ecx, [esi + 0x215]
push ecx
push str.Loading__s__s_image_from__s_..._n
push 0x69aee0
call fcn.00487674
add esp, 0x14
mov eax, dword [esi + 0x368]
cmp eax, dword [esi + 0x39c]
jb 0x401660
mov edx, dword [esi + 8]
push eax
push edx
push str._s:___s__d__requests_a_nonexistent_image__n
push 0x69aee0
call fcn.00487674
add esp, 0x10
mov eax, dword [esi + 0x340]
mov ecx, dword [esi]
push 0
push eax
push ecx
call fcn.00487810
mov eax, dword [esi + 0x8600]
add esp, 0xc
test eax, eax
jne 0x401686
mov ecx, esi
call dword [esi + 0x798d8]
mov eax, dword [esi + 0x866c]
test eax, eax
je 0x401699
cmp dword [eax], 0
jne 0x4038b9
mov eax, dword [esi + 0x394]
test eax, eax
je 0x401881
cmp word [esi + 0x43c], 0
mov dword [esp + 0x44], 0
jbe 0x401881
lea ecx, [ecx]
movzx eax, word [esi + 0x43e]
test eax, eax
mov dword [esp + 0x10], 0
jbe 0x401869
mov eax, dword [esp + 0x44]
and eax, 7
shl eax, 1
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x20]
movzx edx, word [esi + 0x444]
mov eax, dword [esi + 0x330]
and ecx, 1
add ecx, edi
mov edi, dword [esp + 0x44]
shl ecx, 1
shr eax, cl
mov ecx, edx
shr edi, cl
movzx ecx, word [esi + 0x448]
imul edi, ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x3c], ecx
mov ecx, edx
mov edx, dword [esp + 0x3c]
shr edx, cl
and eax, 3
mov dword [esp + 0x1c], eax
add edi, edx
lea edx, [eax + edi*4]
mov eax, dword [esi + 0x488]
cmp word [eax + edx*2], 0
lea eax, [eax + edx*2]
mov dword [esp + 0x24], eax
jne 0x401851
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x44]
add eax, 2
lea edi, [eax - 4]
cmp edi, eax
mov dword [esp + 0x34], edi
ja 0x401851
mov ecx, dword [esp + 0x10]
add ecx, 2
lea edx, [ecx - 4]
mov dword [esp + 0x3c], edx
mov eax, dword [esp + 0x3c]
cmp eax, ecx
mov dword [esp + 0x14], eax
ja 0x401826
movzx ecx, word [esi + 0x43c]
cmp edi, ecx
jae 0x401812
movzx ecx, word [esi + 0x43e]
cmp eax, ecx
jae 0x401812
mov ecx, edi
and ecx, 7
mov edx, eax
and edx, 1
lea ecx, [edx + ecx*2]
mov edx, dword [esi + 0x330]
shl ecx, 1
shr edx, cl
mov ecx, dword [esp + 0x1c]
and edx, 3
cmp edx, ecx
jne 0x401812
movzx ecx, word [esi + 0x444]
shr edi, cl
movzx ecx, word [esi + 0x448]
imul edi, ecx
movzx ecx, word [esi + 0x444]
shr eax, cl
add edi, eax
mov eax, dword [esi + 0x488]
lea ecx, [edx + edi*4]
mov ax, word [eax + ecx*2]
test ax, ax
mov edi, dword [esp + 0x34]
je 0x40180e
mov ecx, dword [esp + 0xc]
xor edx, edx
mov dx, ax
mov eax, dword [esp + 0x40]
inc ecx
mov dword [esp + 0xc], ecx
add eax, edx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc eax
add ecx, 2
cmp eax, ecx
mov dword [esp + 0x14], eax
jbe 0x401786
mov edx, dword [esp + 0x44]
inc edi
lea eax, [edx + 2]
cmp edi, eax
mov dword [esp + 0x34], edi
jbe 0x401776
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x401851
mov eax, dword [esp + 0x40]
xor edx, edx
div ecx
mov ecx, dword [esp + 0x24]
mov word [ecx], ax
mov eax, dword [esp + 0x10]
movzx ecx, word [esi + 0x43e]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x4016e4
mov eax, dword [esp + 0x44]
movzx edx, word [esi + 0x43c]
inc eax
cmp eax, edx
mov dword [esp + 0x44], eax
jb 0x4016c0
mov eax, dword [esi + 0x3a4]
test eax, eax
je 0x4018a6
mov eax, dword [esi + 0x853c]
test eax, eax
jne 0x40189c
mov ecx, esi
call fcn.00404000
mov eax, dword [esi + 0x3a4]
test eax, eax
jne 0x4018b6
cmp dword [esi + 0x853c], 2
jge 0x4018b6
mov ecx, esi
call fcn.0042f0b0
mov eax, dword [esi + 0x866c]
test eax, eax
je 0x4018c9
cmp dword [eax], 0
jne 0x4038b9
cmp word [esi + 0x444], 0
je 0x401a52
mov eax, dword [esi + 0x8534]
test eax, eax
je 0x401902
mov ax, word [esi + 0x446]
mov cx, word [esi + 0x448]
mov word [esi + 0x43c], ax
mov word [esi + 0x43e], cx
jmp 0x401a52
movzx edx, word [esi + 0x43e]
movzx eax, word [esi + 0x43c]
imul edx, eax
push 8
push edx
call fcn.004874ba
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x3c], edi
jne 0x401943
mov ecx, dword [esi + 8]
push str.pre_interpolate__
push ecx
push str._s:_Out_of_memory_in__s_n
push 0x69aee0
call fcn.00487674
add esp, 0x10
xor ecx, ecx
cmp word [esi + 0x43c], cx
mov dword [esp + 0xc], ecx
jbe 0x401a34
movzx eax, word [esi + 0x43e]
lea ecx, [ecx]
xor edx, edx
test eax, eax
mov dword [esp + 0x34], edx
jle 0x401a20
mov eax, ecx
sar eax, 1
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x330]
cmp eax, 1
je 0x401999
and ecx, 7
mov edi, edx
and edi, 1
lea ecx, [edi + ecx*2]
shl ecx, 1
shr eax, cl
mov ecx, dword [esp + 0xc]
and eax, 3
jmp 0x4019c0
xor eax, eax
mov ax, word [esi + 0x440]
xor edi, edi
mov di, word [esi + 0x442]
add eax, ecx
and eax, 0xf
shl eax, 4
add edi, edx
and edi, 0xf
movsx eax, byte [eax + edi + 0x65c1e8]
mov dword [esp + 0x14], eax
movzx eax, word [esi + 0x448]
imul eax, dword [esp + 0x20]
mov edi, dword [esi + 0x488]
sar edx, 1
add eax, edx
mov edx, dword [esp + 0x14]
lea edx, [edx + eax*4]
movzx eax, word [esi + 0x43e]
mov dx, word [edi + edx*2]
imul ecx, eax
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x3c]
add ecx, eax
mov eax, dword [esp + 0x14]
lea ecx, [eax + ecx*4]
mov word [edi + ecx*2], dx
mov edx, dword [esp + 0x34]
movzx eax, word [esi + 0x43e]
mov ecx, dword [esp + 0xc]
inc edx
cmp edx, eax
mov dword [esp + 0x34], edx
jl 0x401976
movzx edx, word [esi + 0x43c]
inc ecx
cmp ecx, edx
mov dword [esp + 0xc], ecx
jl 0x401960
mov eax, dword [esi + 0x488]
push eax
call fcn.00487297
add esp, 4
mov dword [esi + 0x488], edi
mov word [esi + 0x444], 0
mov edi, dword [esi + 0x330]
test edi, edi
je 0x401b0e
cmp dword [esi + 0x458], 3
jne 0x401b0e
mov eax, dword [esi + 0x8538]
test eax, eax
mov dword [esi + 0x388], eax
je 0x401a8c
mov dword [esi + 0x458], 4
jmp 0x401b0e
movzx ecx, word [esi + 0x43c]
shr edi, 5
and edi, 1
cmp edi, ecx
jge 0x401af4
movzx edx, word [esi + 0x43e]
mov eax, edi
and eax, 7
lea ecx, [eax*4 + 2]
mov eax, dword [esi + 0x330]
shr eax, cl
and eax, 1
cmp eax, edx
jge 0x401ae6
nop
mov ecx, edi
imul ecx, edx
mov edx, dword [esi + 0x488]
add ecx, eax
lea ecx, [edx + ecx*8]
mov dx, word [ecx + 6]
mov word [ecx + 2], dx
movzx edx, word [esi + 0x43e]
add eax, 2
cmp eax, edx
jl 0x401ac0
movzx eax, word [esi + 0x43c]
add edi, 2
cmp edi, eax
jl 0x401aa4
mov eax, dword [esi + 0x330]
mov ecx, eax
and ecx, 0xd5555555
shl ecx, 1
not ecx
and ecx, eax
mov dword [esi + 0x330], ecx
mov eax, dword [esi + 0x8534]
test eax, eax
je 0x401b22
mov dword [esi + 0x330], 0
mov eax, dword [esi + 0x330]
test eax, eax
je 0x401b41
mov eax, dword [esi + 0x853c]
test eax, eax
jne 0x401b41
mov edx, dword [ebp + 8]
push edx
mov ecx, esi
call fcn.0042dc50
mov eax, dword [esi + 0x388]
test eax, eax
je 0x401ba1
movzx eax, word [esi + 0x43e]
movzx edx, word [esi + 0x43c]
imul eax, edx
xor ecx, ecx
test eax, eax
mov dword [esi + 0x458], 3
jle 0x401ba1
lea esp, [esp]
mov eax, dword [esi + 0x488]
movzx edx, word [eax + ecx*8 + 6]
movzx edi, word [eax + ecx*8 + 2]
lea eax, [eax + ecx*8]
add edx, edi
sar edx, 1
mov word [eax + 2], dx
movzx eax, word [esi + 0x43e]
movzx edx, word [esi + 0x43c]
imul eax, edx
inc ecx
cmp ecx, eax
jl 0x401b70
mov eax, dword [esi + 0x3a4]
test eax, eax
jne 0x4027a0
cmp dword [esi + 0x458], 3
jne 0x401df9
mov ecx, dword [esi + 0x8560]
mov eax, 1
cmp ecx, eax
mov dword [esp + 0x34], eax
jl 0x401df9
mov eax, dword [esi + 0x8544]
test eax, eax
je 0x401bf4
mov eax, dword [esp + 0x34]
push eax
push str.Median_filter_pass__d..._n
push 0x69aee0
call fcn.00487674
add esp, 0xc
mov dword [esp + 0xc], 0
lea esp, [esp]
movzx ecx, word [esi + 0x43e]
movzx edx, word [esi + 0x43c]
mov eax, dword [esi + 0x488]
imul ecx, edx
lea ecx, [eax + ecx*8]
cmp eax, ecx
jae 0x401c4b
mov ecx, dword [esp + 0xc]
mov dx, word [ecx + eax]
mov word [eax + 6], dx
movzx edi, word [esi + 0x43c]
movzx edx, word [esi + 0x43e]
imul edx, edi
mov edi, dword [esi + 0x488]
add eax, 8
lea edx, [edi + edx*8]
cmp eax, edx
jb 0x401c22
movzx eax, word [esi + 0x43c]
movzx ecx, word [esi + 0x43e]
mov edx, dword [esi + 0x488]
dec eax
imul eax, ecx
lea edi, [edx + ecx*8]
lea eax, [edx + eax*8]
cmp edi, eax
mov dword [esp + 0x4c], edi
jae 0x401dce
mov eax, edi
sub eax, edx
sar eax, 3
inc eax
cdq
idiv ecx
cmp edx, 2
jl 0x401da4
mov eax, ecx
neg eax
cmp eax, ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
jg 0x401d13
lea edx, [eax + 1]
lea edi, [edi + eax*8 - 6]
mov dword [esp + 0x40], edx
mov dword [esp + 0x14], edi
lea esp, [esp]
lea edi, [edx - 2]
cmp edi, edx
jg 0x401cee
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], 3
movzx edx, word [eax]
movzx edi, word [eax + 4]
sub edi, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + edx*4 + 0xa0], edi
inc edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x24]
add eax, 8
dec edx
mov dword [esp + 0x24], edx
jne 0x401cc3
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
lea edx, [ecx*8]
add edi, edx
mov edx, dword [esp + 0x40]
add eax, ecx
add edx, ecx
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x40], edx
jle 0x401cb0
xor ecx, ecx
mov dword [esp + 0x18], ecx
lea esp, [esp]
movzx eax, byte [ecx + 0x65c1bd]
movzx ecx, byte [ecx + 0x65c1bc]
mov edi, dword [esp + ecx*4 + 0xa0]
mov edx, dword [esp + eax*4 + 0xa0]
cmp edi, edx
lea eax, [esp + eax*4 + 0xa0]
lea ecx, [esp + ecx*4 + 0xa0]
jle 0x401d60
xor edx, edi
mov dword [ecx], edx
mov edi, dword [eax]
xor edi, edx
mov dword [eax], edi
mov edx, dword [ecx]
mov eax, edi
xor edx, eax
mov dword [ecx], edx
mov ecx, dword [esp + 0x18]
add ecx, 2
cmp ecx, 0x26
mov dword [esp + 0x18], ecx
jb 0x401d20
mov edi, dword [esp + 0x4c]
movzx edx, word [edi + 2]
mov eax, dword [esp + 0xb0]
add eax, edx
cmp eax, 0xffff
jge 0x401d97
test eax, eax
jge 0x401d90
xor eax, eax
jmp 0x401d9c
cmp eax, 0xffff
jl 0x401d9c
mov eax, 0xffff
mov ecx, dword [esp + 0xc]
mov word [ecx + edi], ax
movzx eax, word [esi + 0x43c]
movzx ecx, word [esi + 0x43e]
mov edx, dword [esi + 0x488]
add edi, 8
dec eax
imul eax, ecx
lea eax, [edx + eax*8]
cmp edi, eax
mov dword [esp + 0x4c], edi
jb 0x401c75
mov eax, dword [esp + 0xc]
add eax, 4
cmp eax, 6
mov dword [esp + 0xc], eax
jl 0x401c00
mov eax, dword [esp + 0x34]
mov ecx, dword [esi + 0x8560]
inc eax
cmp eax, ecx
mov dword [esp + 0x34], eax
jle 0x401bd3
mov eax, dword [esi + 0x3a4]
test eax, eax
jne 0x4027a0
cmp dword [esi + 0x8540], 2
jne 0x402119
mov ecx, dword [esi + 0x458]
sub ecx, 3
cmp ecx, 1
mov dword [esp + 0xc], CreateStatusWindowA
ja 0x402119
mov eax, dword [esi + 0x8544]
test eax, eax
je 0x401e4a
push str.Blending_highlights..._n
push 0x69aee0
call fcn.00487674
add esp, 8
mov edi, dword [esi + 0x458]
test edi, edi
mov dword [esp + 0x24], edi
jle 0x401e97
lea edx, [esi + 0x8588]
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], edi
mov eax, dword [esp + 0x14]
fld dword [eax]
fmul dword [0x65c1b8]
call fcn.00487bd0
cmp dword [esp + 0xc], eax
jle 0x401e81
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
add ecx, 4
dec eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], eax
jne 0x401e66
cmp word [esi + 0x43c], 0
mov dword [esp + 0x44], 0
jbe 0x402119
lea ecx, [ecx]
movzx eax, word [esi + 0x43e]
test eax, eax
mov dword [esp + 0x18], 0
jle 0x402101
xor ecx, ecx
test edi, edi
jle 0x401ef2
mov edx, dword [esp + 0x44]
imul edx, eax
add edx, dword [esp + 0x18]
mov eax, dword [esi + 0x488]
lea eax, [eax + edx*8]
movzx edx, word [eax]
cmp edx, dword [esp + 0xc]
jg 0x401ef2
inc ecx
add eax, 2
cmp ecx, edi
jl 0x401ee1
cmp ecx, edi
je 0x4020e9
xor ecx, ecx
test edi, edi
jle 0x401f50
movzx eax, word [esi + 0x43e]
fild dword [esp + 0xc]
mov edx, dword [esp + 0x44]
imul edx, eax
add edx, dword [esp + 0x18]
mov eax, dword [esi + 0x488]
lea edx, [eax + edx*8]
nop
movzx eax, word [edx]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fcom st(1)
fst dword [esp + ecx*4 + 0x80]
fnstsw ax
test ah, 5
jnp 0x401f3f
fstp st(0)
fld st(0)
fstp dword [esp + ecx*4 + 0x90]
inc ecx
add edx, 2
cmp ecx, edi
jl 0x401f20
fstp st(0)
lea ecx, [esp + 0x28]
xor edx, edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x14], edx
mov edi, edi
xor eax, eax
test edi, edi
mov dword [esp + 0x10], eax
jle 0x401fc3
lea ecx, [esp + edx + 0xa0]
mov dword [esp + 0x1c], ecx
fld dword [0x65c2f0]
lea eax, [eax + edi*4 - 0xc]
mov dword [ecx], 0
shl eax, 4
lea ecx, [esp + edx + 0x80]
add eax, 0x65c138
mov edx, edi
fld dword [eax]
add eax, 4
fmul dword [ecx]
add ecx, 4
dec edx
faddp st(1)
jne 0x401f96
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
fstp dword [ecx]
mov edx, dword [esp + 0x14]
inc eax
add ecx, 4
cmp eax, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], ecx
jl 0x401f75
cmp edi, 1
mov eax, dword [esp + 0x40]
mov dword [eax], 0
jle 0x401ff8
fld dword [0x65c2f0]
lea eax, [esp + edx + 0xa4]
lea ecx, [edi - 1]
fld dword [eax]
add eax, 4
dec ecx
fld st(0)
fmul st(1)
faddp st(2)
fstp st(0)
jne 0x401fe2
mov ecx, dword [esp + 0x40]
fstp dword [ecx]
mov eax, dword [esp + 0x40]
add edx, 0x10
add eax, 4
cmp edx, 0x20
mov dword [esp + 0x40], eax
mov dword [esp + 0x14], edx
jl 0x401f60
fld dword [esp + 0x2c]
mov eax, 1
cmp edi, eax
fdiv dword [esp + 0x28]
fsqrt
fstp dword [esp + 0x20]
jle 0x402047
lea ebx, [ebx]
fld dword [esp + 0x20]
inc eax
cmp eax, edi
fmul dword [esp + eax*4 + 0x9c]
fstp dword [esp + eax*4 + 0x9c]
jl 0x402030
xor edx, edx
test edi, edi
jle 0x402097
lea eax, [esp + 0x80]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
fld dword [0x65c2f0]
xor ecx, ecx
mov dword [eax], ecx
lea eax, [edx + edi*4 - 0xc]
shl eax, 4
add eax, 0x65c0b8
fld dword [esp + ecx*4 + 0xa0]
inc ecx
fmul dword [eax]
add eax, 4
cmp ecx, edi
faddp st(1)
jl 0x402072
mov eax, dword [esp + 0x14]
fstp dword [eax]
inc edx
add eax, 4
cmp edx, edi
mov dword [esp + 0x14], eax
jl 0x402058
test edi, edi
mov dword [esp + 0x10], 0
jle 0x4020e9
fild dword [esp + 0x24]
mov edi, dword [esp + 0x10]
fdivr dword [esp + edi*4 + 0x80]
call fcn.00487bd0
movzx ecx, word [esi + 0x43e]
imul ecx, dword [esp + 0x44]
add ecx, dword [esp + 0x18]
lea edx, [edi + ecx*4]
mov ecx, dword [esi + 0x488]
inc edi
mov dword [esp + 0x10], edi
mov word [ecx + edx*2], ax
mov edi, dword [esi + 0x458]
cmp dword [esp + 0x10], edi
mov dword [esp + 0x24], edi
jl 0x4020a3
mov ecx, dword [esp + 0x18]
movzx eax, word [esi + 0x43e]
inc ecx
cmp ecx, eax
mov dword [esp + 0x18], ecx
jl 0x401ec7
mov eax, dword [esp + 0x44]
movzx edx, word [esi + 0x43c]
inc eax
cmp eax, edx
mov dword [esp + 0x44], eax
jl 0x401eb0
mov eax, dword [esi + 0x3a4]
test eax, eax
jne 0x4027a0
cmp dword [esi + 0x8540], 2
jle 0x4027a0
mov eax, dword [esi + 0x8544]
test eax, eax
je 0x402150
push str.Rebuilding_highlights..._n
push 0x69aee0
call fcn.00487674
add esp, 8
mov ecx, dword [esi + 0x8540]
fld qword [0x65c0b0]
mov eax, 4
sub eax, ecx
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
call fcn.004879b0
fstp dword [esp + 0x1c]
mov eax, dword [esi + 0x458]
xor edi, edi
test eax, eax
jbe 0x4021be
lea ecx, [esi + 0x8588]
mov dword [esp + 0x14], ecx
lea ebx, [ebx]
mov edx, dword [esp + 0x14]
fld dword [edx]
fmul dword [0x65c0ac]
call fcn.00487bd0
mov ecx, dword [esp + 0x14]
mov dword [esp + edi*4 + 0xa0], eax
mov eax, dword [esi + 0x458]
inc edi
add ecx, 4
cmp edi, eax
mov dword [esp + 0x14], ecx
jb 0x402190
mov eax, dword [esi + 0x458]
xor edi, edi
mov ecx, 1
cmp eax, ecx
mov dword [esp + 0x14], edi
jbe 0x402209
lea edx, [esi + 0x858c]
lea esp, [esp]
fld dword [edi + esi + 0x8588]
fcomp dword [edx]
fnstsw ax
test ah, 5
jp 0x4021fb
mov dword [esp + 0x14], ecx
lea edi, [ecx*4]
mov eax, dword [esi + 0x458]
inc ecx
add edx, 4
cmp ecx, eax
jb 0x4021e0
mov cl, byte [esi + 0x444]
movzx eax, word [esi + 0x43c]
mov edi, 4
sar edi, cl
cdq
push 4
idiv edi
mov ecx, eax
movzx eax, word [esi + 0x43e]
cdq
idiv edi
mov dword [esp + 0x14], ecx
imul ecx, eax
push ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x3c], ecx
call fcn.004874ba
xor edx, edx
add esp, 8
cmp eax, edx
mov dword [esp + 0x44], eax
jne 0x40226d
mov eax, dword [esi + 8]
push str.recover_highlights__
push eax
push str._s:_Out_of_memory_in__s_n
push 0x69aee0
call fcn.00487674
add esp, 0x10
xor edx, edx
cmp dword [esi + 0x458], edx
mov dword [esp + 0x40], edx
jbe 0x402793
mov dword [esp + 0xc], edx
mov ecx, dword [esp + 0x14]
cmp dword [esp + 0x40], ecx
je 0x402771
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x44]
xor eax, eax
rep stosd dword es:[edi], eax
cmp dword [esp + 0x10], edx
mov dword [esp + 0x38], edx
jbe 0x402407
mov dword [esp + 0x24], edx
lea ecx, [ecx]
cmp dword [esp + 0x48], edx
mov dword [esp + 0x50], edx
jbe 0x4023e4
mov edi, edi
mov cl, byte [esi + 0x444]
fld dword [0x65c2f0]
fld dword [0x65c2f0]
mov edi, 4
sar edi, cl
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x58], edx
mov eax, edi
imul eax, ecx
inc ecx
imul ecx, edi
cmp eax, ecx
mov dword [esp + 0x54], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ecx
jae 0x4023a9
mov ecx, dword [esp + 0x50]
mov edx, edi
imul edx, ecx
inc ecx
imul ecx, edi
mov dword [esp + 0x4c], edx
mov dword [esp + 0x3c], ecx
cmp edx, dword [esp + 0x3c]
jae 0x402396
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + ecx*4 + 0xa0]
movzx ecx, word [esi + 0x43e]
imul ecx, eax
mov eax, dword [esi + 0x488]
add ecx, edx
lea ecx, [eax + ecx*8]
mov eax, dword [esp + 0x3c]
sub eax, edx
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0xc]
movzx eax, word [edx + ecx]
mov dword [esp + 0x78], eax
cdq
idiv edi
cmp eax, 1
jne 0x40237c
mov eax, dword [esp + 0x14]
mov ax, word [ecx + eax*2]
cmp ax, 0x5dc0
jbe 0x40237c
fiadd dword [esp + 0x78]
xor edx, edx
mov dx, ax
inc dword [esp + 0x58]
mov dword [esp + 0x78], edx
fild dword [esp + 0x78]
faddp st(2)
mov eax, dword [esp + 0x20]
add ecx, 8
dec eax
mov dword [esp + 0x20], eax
jne 0x402343
mov edi, dword [esp + 0x54]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x402313
xor edx, edx
mov ecx, dword [esp + 0x58]
mov eax, edi
imul eax, edi
cmp ecx, eax
jne 0x4023cb
fdiv st(1)
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x24]
add ecx, eax
mov eax, dword [esp + 0x44]
fstp dword [eax + ecx*4]
jmp 0x4023cd
fstp st(0)
mov eax, dword [esp + 0x50]
fstp st(0)
mov ecx, dword [esp + 0x48]
inc eax
cmp eax, ecx
mov dword [esp + 0x50], eax
jb 0x4022c0
mov ecx, dword [esp + 0x48]
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x38]
add edi, ecx
mov ecx, dword [esp + 0x10]
inc eax
cmp eax, ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], edi
jb 0x4022b0
fld dword [0x65c0a8]
fdiv dword [esp + 0x1c]
call fcn.00487bd0
test eax, eax
mov dword [esp + 0x18], eax
je 0x4025b6
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
dec ecx
test eax, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x38], 0
jbe 0x402569
mov edx, dword [esp + 0x44]
mov dword [esp + 0x24], edx
mov ecx, dword [esp + 0x48]
test ecx, ecx
mov dword [esp + 0x50], 0
jbe 0x402543
mov eax, dword [esp + 0x24]
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 0x4c]
fld dword [ecx]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jp 0x402523
fld dword [0x65c2f0]
xor edx, edx
mov dword [esp + 0x58], edx
movsx eax, byte [edx*2 + 0x65c098]
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x50]
add eax, ecx
movsx ecx, byte [edx*2 + 0x65c099]
add ecx, edi
cmp eax, dword [esp + 0x10]
jae 0x4024fc
mov edi, dword [esp + 0x48]
cmp ecx, edi
jae 0x4024fc
imul eax, edi
add eax, ecx
mov ecx, dword [esp + 0x44]
lea ecx, [ecx + eax*4]
fld dword [ecx]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x41
jne 0x4024fc
mov eax, edx
and eax, 1
lea edi, [eax + 1]
mov dword [esp + 0x80], edi
mov dword [esp + 0x84], 0
fild qword [esp + 0x80]
fmul dword [ecx]
mov ecx, dword [esp + 0x58]
lea eax, [ecx + eax + 1]
mov dword [esp + 0x58], eax
faddp st(1)
inc edx
cmp edx, 8
jb 0x402486
cmp dword [esp + 0x58], 3
jle 0x402521
fld dword [esp + 0x1c]
mov ecx, dword [esp + 0x4c]
fadd st(1)
fild dword [esp + 0x58]
fadd dword [esp + 0x1c]
fdivp st(1)
fchs
fstp dword [ecx]
fstp st(0)
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
inc eax
add edi, 4
cmp eax, ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], edi
jb 0x402463
mov edx, dword [esp + 0x38]
lea eax, [ecx*4]
mov ecx, dword [esp + 0x24]
add ecx, eax
mov eax, dword [esp + 0x10]
inc edx
cmp edx, eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x24], ecx
jb 0x402447
mov eax, dword [esp + 0x34]
xor ecx, ecx
xor edi, edi
test eax, eax
jbe 0x4025b6
mov edx, dword [esp + 0x44]
lea esp, [esp]
fld dword [edx + ecx*4]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 5
jp 0x40259d
fld dword [edx + ecx*4]
mov edi, 1
fchs
fstp dword [edx + ecx*4]
mov eax, dword [esp + 0x34]
inc ecx
cmp ecx, eax
jb 0x402580
test edi, edi
je 0x4025b6
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x402422
mov edi, dword [esp + 0x34]
xor ecx, ecx
test edi, edi
jbe 0x4025e0
mov edx, dword [esp + 0x44]
fld dword [edx + ecx*4]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jp 0x4025db
mov dword [edx + ecx*4], 0x3f800000
inc ecx
cmp ecx, edi
jb 0x4025c4
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x38], 0
jbe 0x40276f
mov dword [esp + 0x24], 0
lea esp, [esp]
mov eax, dword [esp + 0x48]
test eax, eax
mov dword [esp + 0x50], 0
jbe 0x40274c
mov cl, byte [esi + 0x444]
mov edx, dword [esp + 0x38]
mov eax, 4
sar eax, cl
mov ecx, eax
imul ecx, edx
inc edx
imul edx, eax
cmp ecx, edx
mov dword [esp + 0x18], ecx
jae 0x402737
lea ebx, [ebx]
mov edx, dword [esp + 0x50]
mov ecx, eax
imul ecx, edx
inc edx
imul edx, eax
cmp ecx, edx
mov dword [esp + 0x4c], ecx
jae 0x402711
mov edx, dword [esp + 0x40]
mov eax, dword [esp + edx*4 + 0xa0]
mov dword [esp + 0x28], eax
movzx ecx, word [esi + 0x43e]
imul ecx, dword [esp + 0x18]
add ecx, dword [esp + 0x4c]
mov edx, dword [esi + 0x488]
lea eax, [edx + ecx*8]
mov ecx, dword [esp + 0xc]
movzx edi, word [ecx + eax]
mov dword [esp + 0x20], eax
mov eax, edi
cdq
idiv dword [esp + 0x28]
cmp eax, 1
jle 0x4026eb
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
add edx, eax
mov eax, dword [esp + 0x14]
movzx ecx, word [ecx + eax*2]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x54], ecx
fild dword [esp + 0x54]
fmul dword [eax + edx*4]
call fcn.00487bd0
cmp edi, eax
jge 0x4026eb
cmp eax, 0xffff
jge 0x4026da
xor ecx, ecx
test eax, eax
setl cl
dec ecx
and eax, ecx
jmp 0x4026df
mov eax, 0xffff
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x20]
mov word [edx + ecx], ax
mov cl, byte [esi + 0x444]
mov eax, dword [esp + 0x4c]
mov edx, 4
sar edx, cl
mov ecx, dword [esp + 0x50]
inc eax
inc ecx
imul edx, ecx
cmp eax, edx
mov dword [esp + 0x4c], eax
jb 0x402668
mov cl, byte [esi + 0x444]
mov edx, dword [esp + 0x18]
mov eax, 4
sar eax, cl
mov ecx, dword [esp + 0x38]
inc edx
inc ecx
imul ecx, eax
cmp edx, ecx
mov dword [esp + 0x18], edx
jb 0x402640
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x48]
inc eax
cmp eax, ecx
mov dword [esp + 0x50], eax
jb 0x402614
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x10]
inc eax
add edi, edx
cmp eax, ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], edi
jb 0x402600
xor edx, edx
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0xc]
mov ecx, dword [esi + 0x458]
inc eax
add edi, 2
cmp eax, ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0xc], edi
jb 0x402281
mov eax, dword [esp + 0x44]
push eax
call fcn.00487297
add esp, 4
cmp word [esi + 0x44a], 0
je 0x402a8e
mov eax, dword [esi + 0x8544]
test eax, eax
je 0x4027ca
push str.Rotating_image_45_degrees..._n
push 0x69aee0
call fcn.00487674
add esp, 8
fld qword [0x65c2f8]
movzx ecx, word [esi + 0x444]
fsqrt
movzx edx, word [esi + 0x44a]
lea eax, [edx + ecx - 1]
sar eax, cl
xor edi, edi
mov di, ax
mov word [esi + 0x44a], ax
mov dword [esp + 0x28], edi
fst qword [esp + 0x80]
fdivr qword [0x65c300]
fild dword [esp + 0x28]
fmul st(1)
call fcn.00487bd0
mov dword [esp + 0xc], eax
movzx eax, word [esi + 0x43c]
sub eax, edi
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fmul st(1)
call fcn.00487bd0
fstp st(0)
movzx ecx, word [esp + 0xc]
xor edi, edi
mov di, ax
push 8
mov dword [esp + 0x50], eax
mov edx, edi
imul edx, ecx
push edx
call fcn.004874ba
add esp, 8
test eax, eax
mov dword [esp + 0x18], eax
jne 0x40286d
mov eax, dword [esi + 8]
push str.fuji_rotate__
push eax
push str._s:_Out_of_memory_in__s_n
push 0x69aee0
call fcn.00487674
add esp, 0x10
xor ecx, ecx
cmp edi, ecx
mov dword [esp + 0x34], ecx
jle 0x402a54
fld qword [esp + 0x80]
mov dword [esp + 0x40], ecx
jmp 0x402890
xor ecx, ecx
lea ebx, [ebx]
movzx eax, word [esp + 0xc]
cmp eax, ecx
mov dword [esp + 0x14], ecx
jle 0x402a2d
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x24], ecx
lea esp, [esp]
movzx edx, word [esi + 0x44a]
fild dword [esp + 0x24]
mov dword [esp + 0x28], edx
fmul st(1)
fild dword [esp + 0x28]
faddp st(1)
fst dword [esp + 0x20]
call fcn.00487bd0
mov ecx, dword [esp + 0x34]
mov edi, eax
mov eax, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fmul st(1)
fst dword [esp + 0x3c]
call fcn.00487bd0
movzx edx, word [esi + 0x43c]
sub edx, 2
cmp edi, edx
ja 0x402a0e
movzx ecx, word [esi + 0x43e]
lea edx, [ecx - 2]
cmp eax, edx
ja 0x402a0e
xor edx, edx
imul ecx, edi
mov dword [esp + 0x80], edi
mov dword [esp + 0x84], edx
mov dword [esp + 0x78], eax
fild qword [esp + 0x80]
mov dword [esp + 0x7c], edx
add ecx, eax
mov eax, dword [esi + 0x488]
fsubr dword [esp + 0x20]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x458]
xor edi, edi
cmp eax, edx
fstp dword [esp + 0x20]
fild qword [esp + 0x78]
mov dword [esp + 0x28], ecx
fsubr dword [esp + 0x3c]
fstp dword [esp + 0x1c]
jle 0x402a0e
mov edx, dword [esp + 0x40]
fld dword [0x65c2f4]
mov eax, dword [esp + 0x14]
fsub dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
fld dword [0x65c2f4]
fsub dword [esp + 0x20]
add edx, eax
lea edx, [ecx + edx*8]
mov dword [esp + 0x3c], edx
movzx ecx, word [esi + 0x43e]
mov eax, dword [esp + 0x28]
lea edx, [edi + ecx*4 + 4]
movzx edx, word [eax + edx*2]
mov dword [esp + 0x54], edx
lea ecx, [edi + ecx*4]
movzx edx, word [eax + ecx*2]
fild dword [esp + 0x54]
movzx ecx, word [eax + edi*2]
fmul dword [esp + 0x1c]
mov dword [esp + 0x54], edx
movzx edx, word [eax + edi*2 + 8]
fild dword [esp + 0x54]
mov dword [esp + 0x54], ecx
fmul st(3)
faddp st(1)
fmul dword [esp + 0x20]
fild dword [esp + 0x54]
mov dword [esp + 0x54], edx
fmul st(3)
fild dword [esp + 0x54]
fmul dword [esp + 0x1c]
faddp st(1)
fmul st(2)
faddp st(1)
call fcn.00487bd0
mov ecx, dword [esp + 0x3c]
mov word [ecx], ax
mov eax, dword [esi + 0x458]
inc edi
add ecx, 2
cmp edi, eax
mov dword [esp + 0x3c], ecx
jl 0x402991
fstp st(0)
fstp st(0)
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
movzx ecx, word [esp + 0xc]
inc eax
dec edi
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], edi
jl 0x4028b0
movzx ecx, word [esp + 0xc]
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 0x34]
add edi, ecx
movzx ecx, word [esp + 0x4c]
inc eax
cmp eax, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], edi
jl 0x402888
fstp st(0)
mov eax, dword [esi + 0x488]
push eax
call fcn.00487297
mov cx, word [esp + 0x10]
mov dx, word [esp + 0x50]
mov eax, dword [esp + 0x1c]
add esp, 4
mov word [esi + 0x43e], cx
mov word [esi + 0x43c], dx
mov dword [esi + 0x488], eax
mov word [esi + 0x44a], 0
mov ecx, esi
call fcn.004300c0
mov eax, dword [esi + 0x460]
test eax, eax
jne 0x402aaf
cmp dword [esi + 0x464], 0x3ff00000
je 0x402e87
mov eax, dword [esi + 0x8544]
test eax, eax
je 0x402acb
push str.Stretching_the_image..._n
push 0x69aee0
call fcn.00487674
add esp, 8
fld qword [esi + 0x460]
fcomp qword [0x65c300]
fnstsw ax
test ah, 5
jp 0x402ca3
movzx ecx, word [esi + 0x43c]
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fdiv qword [esi + 0x460]
fadd qword [0x65c2f8]
call fcn.00487bd0
movzx edx, word [esi + 0x43e]
xor edi, edi
mov di, ax
push 8
mov dword [esp + 0x10], eax
imul edx, edi
push edx
call fcn.004874ba
add esp, 8
test eax, eax
mov dword [esp + 0x14], eax
jne 0x402b43
mov eax, dword [esi + 8]
push str.stretch__
push eax
push str._s:_Out_of_memory_in__s_n
push 0x69aee0
call fcn.00487674
add esp, 0x10
test edi, edi
fld qword [0x65c090]
mov dword [esp + 0x18], 0
jle 0x402c92
lea esp, [esp]
fld st(0)
call fcn.00487bd0
movzx ecx, word [esi + 0x43e]
mov edi, dword [esi + 0x488]
mov edx, eax
imul edx, ecx
lea edx, [edi + edx*8]
movzx edi, word [esi + 0x43c]
mov dword [esp + 0x38], eax
inc eax
cmp eax, edi
fild dword [esp + 0x38]
mov dword [esp + 0x48], edx
mov dword [esp + 0x10], edx
fsubr st(1)
jge 0x402ba1
lea eax, [edx + ecx*8]
mov dword [esp + 0x48], eax
test ecx, ecx
mov dword [esp + 0x1c], 0
jle 0x402c74
mov eax, dword [esi + 0x458]
test eax, eax
mov dword [esp + 0x38], 0
jle 0x402c43
mov edi, dword [esp + 0x48]
fld qword [0x65c300]
mov eax, dword [esp + 0x10]
fsub st(1)
sub eax, edi
mov dword [esp + 0x24], eax
lea ecx, [ecx]
mov ecx, dword [esp + 0x24]
movzx edx, word [ecx + edi]
movzx eax, word [edi]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
mov dword [esp + 0x28], eax
fmul st(1)
fild dword [esp + 0x28]
fmul st(3)
faddp st(1)
fadd qword [0x65c2f8]
call fcn.00487bd0
movzx ecx, word [esi + 0x43e]
imul ecx, dword [esp + 0x18]
add ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x38]
lea ecx, [edx + ecx*4]
mov edx, dword [esp + 0x14]
mov word [edx + ecx*2], ax
mov ecx, dword [esp + 0x38]
mov eax, dword [esi + 0x458]
inc ecx
add edi, 2
cmp ecx, eax
mov dword [esp + 0x38], ecx
jl 0x402be0
fstp st(0)
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov edx, 8
add edi, edx
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x48]
add edi, edx
movzx edx, word [esi + 0x43e]
inc ecx
cmp ecx, edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x48], edi
jl 0x402bb7
mov ecx, dword [esp + 0x18]
fstp st(0)
movzx eax, word [esp + 0xc]
fadd qword [esi + 0x460]
inc ecx
cmp ecx, eax
mov dword [esp + 0x18], ecx
jl 0x402b60
mov ax, word [esp + 0xc]
mov word [esi + 0x43c], ax
jmp 0x402e6c
movzx ecx, word [esi + 0x43e]
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fmul qword [esi + 0x460]
fadd qword [0x65c2f8]
call fcn.00487bd0
movzx edx, word [esi + 0x43c]
xor edi, edi
mov di, ax
push 8
mov dword [esp + 0x10], eax
imul edx, edi
push edx
call fcn.004874ba
add esp, 8
push str.stretch__
push eax
mov ecx, esi
mov dword [esp + 0x1c], eax
call fcn.00403aa0
test edi, edi
fld qword [0x65c090]
jle 0x402e60
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], edi
lea esp, [esp]
fld st(0)
call fcn.00487bd0
mov ecx, dword [esi + 0x488]
movzx edx, word [esi + 0x43e]
mov dword [esp + 0x38], eax
lea ecx, [ecx + eax*8]
inc eax
cmp eax, edx
fild dword [esp + 0x38]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x10], ecx
fsubr st(1)
jge 0x402d45
add ecx, 8
mov dword [esp + 0x48], ecx
cmp word [esi + 0x43c], 0
mov dword [esp + 0x18], 0
jbe 0x402e36
movzx eax, word [esp + 0xc]
mov edx, dword [esp + 0x34]
mov ecx, dword [esi + 0x458]
shl eax, 3
mov dword [esp + 0x54], eax
mov dword [esp + 0x1c], edx
test ecx, ecx
mov dword [esp + 0x38], 0
jle 0x402df2
mov eax, dword [esp + 0x1c]
fld qword [0x65c300]
mov edi, dword [esp + 0x48]
fsub st(1)
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
sub eax, edi
mov dword [esp + 0x24], eax
nop
mov ecx, dword [esp + 0x24]
movzx edx, word [edi + ecx]
movzx eax, word [edi]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
mov dword [esp + 0x28], eax
fmul st(1)
fild dword [esp + 0x28]
fmul st(3)
faddp st(1)
fadd qword [0x65c2f8]
call fcn.00487bd0
mov ecx, dword [esp + 0x20]
mov word [ecx], ax
mov eax, dword [esp + 0x38]
add ecx, 2
inc eax
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + 0x458]
add edi, 2
cmp eax, ecx
mov dword [esp + 0x38], eax
jl 0x402da0
fstp st(0)
mov eax, dword [esp + 0x54]
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
add edi, eax
movzx eax, word [esi + 0x43e]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x10]
shl eax, 3
add edi, eax
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x48]
add edi, eax
movzx eax, word [esi + 0x43c]
inc edx
cmp edx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x48], edi
jl 0x402d75
fstp st(0)
mov ecx, dword [esp + 0x34]
fld qword [0x65c300]
mov eax, dword [esp + 0x3c]
fdiv qword [esi + 0x460]
add ecx, 8
dec eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x3c], eax
faddp st(1)
jne 0x402d10
mov cx, word [esp + 0xc]
mov word [esi + 0x43e], cx
mov edx, dword [esi + 0x488]
fstp st(0)
push edx
call fcn.00487297
mov eax, dword [esp + 0x18]
add esp, 4
mov dword [esi + 0x488], eax
mov eax, dword [esi + 0x8604]
test eax, eax
je 0x403561
lea edx, [esi + 0x215]
test edx, edx
mov dword [esp + 0xc], 0
je 0x402ebe
or ecx, 0xffffffff
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x14]
call fcn.0049d9d0
mov edi, dword [esi + 0x8604]
mov ecx, dword [esp + 0xc]
mov eax, dword [edi + 0xd4]
add edi, 0xd4
cmp eax, ecx
je 0x402f17
mov ecx, edi
call fcn.004039f0
mov edx, dword [esp + 0xc]
mov dword [edi], edx
mov eax, dword [esp + 0xc]
test eax, eax
je 0x402f17
mov ecx, dword [eax]
and ecx, 0xff
cmp ecx, 0x80
jae 0x402f10
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
cmp eax, 0xff
jne 0x402f17
mov ecx, edi
call fcn.0049d350
lea ecx, [esp + 0xc]
call fcn.004039f0
lea edx, [esi + 0x255]
test edx, edx
mov dword [esp + 0xc], 0
je 0x402f49
or ecx, 0xffffffff
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x14]
call fcn.0049d9d0
mov edi, dword [esi + 0x8604]
mov edx, dword [esp + 0xc]
mov eax, dword [edi + 0xd8]
add edi, 0xd8
cmp eax, edx
je 0x402fa2
mov ecx, edi
call fcn.004039f0
mov eax, dword [esp + 0xc]
mov dword [edi], eax
mov eax, dword [esp + 0xc]
test eax, eax
je 0x402fa2
mov ecx, dword [eax]
and ecx, 0xff
cmp ecx, 0x80
jae 0x402f9b
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
cmp eax, 0xff
jne 0x402fa2
mov ecx, edi
call fcn.0049d350
lea ecx, [esp + 0xc]
call fcn.004039f0
lea edx, [esi + 0x324]
push edx
call fcn.00487137
mov edi, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
add edi, 0x76c
mov dword [eax + 0x14], edi
mov ecx, edi
mov edi, dword [eax]
push edi
mov edi, dword [eax + 4]
push edi
mov edi, dword [eax + 8]
inc edx
push edi
mov dword [eax + 0x10], edx
mov eax, dword [eax + 0xc]
push eax
push edx
push ecx
mov ecx, dword [esi + 0x8604]
add ecx, 0xdc
push str._d:_d:_d__d:_d:_d
push ecx
call fcn.00403a60
movzx edx, word [esi + 0x43c]
mov eax, dword [esi + 0x8604]
mov dword [eax + 8], edx
movzx ecx, word [esi + 0x43e]
mov edx, dword [esi + 0x8604]
mov dword [edx + 0xc], ecx
add esp, 0x24
fld dword [esi + 0x320]
call fcn.00487bd0
mov ecx, dword [esi + 0x8604]
mov dword [ecx + 0x2c], eax
mov eax, dword [esi + 0x8640]
cmp eax, 2
je 0x403045
cmp eax, 1
jne 0x403071
mov eax, dword [esi + 0x863c]
test eax, eax
je 0x403071
mov edx, dword [esi + 0x8604]
mov eax, dword [esi + 0x8638]
add edx, 0x50
mov dword [edx], eax
mov ecx, dword [esi + 0x863c]
mov dword [edx + 4], ecx
mov eax, dword [esi + 0x8640]
mov dword [edx + 8], eax
mov ecx, dword [esi + 0x8644]
mov dword [edx + 0xc], ecx
mov eax, dword [esi + 0x8650]
cmp eax, 2
je 0x40308b
cmp eax, 1
jne 0x4030b7
mov eax, dword [esi + 0x864c]
test eax, eax
je 0x4030b7
mov edx, dword [esi + 0x8604]
mov eax, dword [esi + 0x8648]
add edx, 0x60
mov dword [edx], eax
mov ecx, dword [esi + 0x864c]
mov dword [edx + 4], ecx
mov eax, dword [esi + 0x8650]
mov dword [edx + 8], eax
mov ecx, dword [esi + 0x8654]
mov dword [edx + 0xc], ecx
mov eax, dword [esi + 0x8604]
lea edx, [esi + 0x8658]
mov ecx, dword [edx]
add eax, 0x70
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov edx, dword [edx + 0xc]
mov dword [eax + 0xc], edx
fld dword [esi + 0x318]
call fcn.00487bd0
mov ecx, dword [esi + 0x8604]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi + 0x8620]
cmp eax, 2
je 0x40310a
cmp eax, 1
jne 0x403139
mov eax, dword [esi + 0x861c]
test eax, eax
je 0x403139
mov edx, dword [esi + 0x8604]
mov eax, dword [esi + 0x8618]
add edx, 0x80
mov dword [edx], eax
mov ecx, dword [esi + 0x861c]
mov dword [edx + 4], ecx
mov eax, dword [esi + 0x8620]
mov dword [edx + 8], eax
mov ecx, dword [esi + 0x8624]
mov dword [edx + 0xc], ecx
movsx edx, word [esi + 0x8608]
mov eax, dword [esi + 0x8604]
mov dword [eax + 0x20], edx
movsx ecx, word [esi + 0x860a]
mov edx, dword [esi + 0x8604]
mov dword [edx + 0x24], ecx
mov eax, dword [esi + 0x8630]
cmp eax, 2
je 0x403173
cmp eax, 1
jne 0x4031a1
mov eax, dword [esi + 0x862c]
test eax, eax
je 0x4031a1
mov eax, dword [esi + 0x8604]
mov ecx, dword [esi + 0x8628]
add eax, 0xa0
mov dword [eax], ecx
mov edx, dword [esi + 0x862c]
mov dword [eax + 4], edx
mov ecx, dword [esi + 0x8630]
mov dword [eax + 8], ecx
mov edx, dword [esi + 0x8634]
mov dword [eax + 0xc], edx
movsx eax, word [esi + 0x8610]
mov ecx, dword [esi + 0x8604]
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fstp dword [ecx + 0xc4]
mov edx, dword [esi + 0x8604]
mov eax, dword [esi + 0x8668]
mov dword [edx + 0xc0], eax
movsx ecx, word [esi + 0x860e]
mov edx, dword [esi + 0x8604]
mov dword [edx + 0x34], ecx
mov ecx, dword [esi + 0x8604]
mov eax, dword [ecx + 0x34]
dec eax
cmp eax, 4
mov dword [esp + 0x28], ecx
ja case.default.0x4031f1
jmp dword [eax*4 + 0x40396c]
mov dword [esp + 0x10], 0x41cb3333
jmp 0x403228
mov dword [esp + 0x10], 0x41200000
jmp 0x403228
mov dword [esp + 0x10], 0x3f800000
jmp 0x403228
mov dword [esp + 0x10], 0x3a83126f
jmp 0x403228
mov dword [esp + 0x10], 0
fld dword [ecx + 0xc0]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jp 0x4032b5
mov eax, dword [ecx + 8]
test eax, eax
je 0x4032b5
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x4032b5
fld dword [esp + 0x10]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jnp 0x4032b5
add ecx, 0xa0
call fcn.00403980
test al, al
je 0x4032b5
mov edi, dword [esp + 0x28]
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
cmp eax, ecx
ja 0x403279
mov eax, ecx
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], 0
fild qword [esp + 0x80]
lea ecx, [edi + 0xa0]
fmul dword [esp + 0x10]
fstp qword [esp + 0x80]
call fcn.004039a0
fdivr qword [esp + 0x80]
fstp dword [edi + 0xc0]
mov edi, dword [esi + 0x8604]
fld dword [edi + 0xc4]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jp 0x403315
fld dword [edi + 0xc0]
fcomp dword [0x65c2f0]
fnstsw ax
test ah, 0x44
jnp 0x403315
mov eax, dword [edi + 0x58]
cmp eax, 2
lea ecx, [edi + 0x50]
je 0x4032f8
cmp eax, 1
jne 0x403315
mov eax, dword [ecx + 4]
test eax, eax
je 0x403315
call fcn.004039a0
fdiv dword [edi + 0xc0]
fmul qword [0x65c088]
fadd qword [0x65c2f8]
fstp dword [edi + 0xc4]
mov eax, dword [esi + 0x3b8]
test eax, eax
je 0x403561
mov eax, dword [esi + 0x8604]
add eax, 0x138
mov byte [eax], 1
xor edx, edx
mov dword [eax + 8], edx
mov dword [eax + 0x40], edx
mov dword [eax + 0x18], edx
mov dword [eax + 0x28], edx
mov dword [eax + 0x38], edx
mov dword [eax + 0x50], edx
mov dword [eax + 0x60], edx
mov dword [eax + 0x70], edx
mov dword [eax + 0x80], edx
mov dword [eax + 0x90], edx
mov dword [eax + 0xa0], edx
mov dword [eax + 0xb0], edx
mov ecx, dword [esi + 0x428]
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0x3b8]
cmp ecx, edx
je 0x403398
mov edx, dword [esi + 0x3b4]
lea edi, [eax + 0x10]
mov dword [edi], edx
mov edx, dword [esp + 0xac]
mov dword [edi + 4], ecx
mov ecx, 1
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
xor edx, edx
mov ecx, dword [esi + 0x3c0]
cmp ecx, edx
mov dword [esp + 0x28], ecx
je 0x4033ca
mov ecx, dword [esi + 0x3bc]
lea edi, [eax + 0x20]
mov dword [edi], ecx
mov ecx, dword [esp + 0x28]
mov dword [edi + 4], ecx
mov ecx, 1
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0xac]
mov dword [edi + 0xc], ecx
mov ecx, dword [esi + 0x3c8]
cmp ecx, edx
mov dword [esp + 0x28], ecx
je 0x4033fc
mov ecx, dword [esi + 0x3c4]
lea edi, [eax + 0x30]
mov dword [edi], ecx
mov ecx, dword [esp + 0x28]
mov dword [edi + 4], ecx
mov ecx, 1
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0xac]
mov dword [edi + 0xc], ecx
mov ecx, dword [esi + 0x42c]
mov dword [eax + 0x40], ecx
mov ecx, dword [esi + 0x3d0]
cmp ecx, edx
je 0x403431
mov edx, dword [esi + 0x3cc]
lea edi, [eax + 0x48]
mov dword [edi], edx
mov edx, dword [esp + 0xac]
mov dword [edi + 4], ecx
mov ecx, 1
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
xor edx, edx
mov ecx, dword [esi + 0x3d8]
cmp ecx, edx
mov dword [esp + 0x28], ecx
je 0x403463
mov ecx, dword [esi + 0x3d4]
lea edi, [eax + 0x58]
mov dword [edi], ecx
mov ecx, dword [esp + 0x28]
mov dword [edi + 4], ecx
mov ecx, 1
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0xac]
mov dword [edi + 0xc], ecx
mov ecx, dword [esi + 0x3e0]
cmp ecx, edx
mov dword [esp + 0x28], ecx
je 0x403495
mov ecx, dword [esi + 0x3dc]
lea edi, [eax + 0x68]
mov dword [edi], ecx
mov ecx, dword [esp + 0x28]
mov dword [edi + 4], ecx
mov ecx, 1
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0xac]
mov dword [edi + 0xc], ecx
mov ecx, dword [esi + 0x400]
cmp ecx, edx
mov dword [esp + 0x28], ecx
je 0x4034c7
mov ecx, dword [esi + 0x3fc]
lea edi, [eax + 0x78]
mov dword [edi], ecx
mov ecx, dword [esp + 0x28]
mov dword [edi + 4], ecx
mov ecx, 1
mov dword [edi + 8], ecx
mov ecx, dword [esp + 0xac]
mov dword [edi + 0xc], ecx
mov ecx, dword [esi + 0x3e8]
cmp ecx, edx
mov dword [esp + 0x28], ecx
je 0x4034fe
mov ecx, dword [esi + 0x3e4]
lea edx, [eax + 0x88]
mov dword [edx], ecx
mov ecx, dword [esp + 0x28]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0xac]
mov edi, 1
mov dword [edx + 8], edi
mov dword [edx + 0xc], ecx
xor edx, edx
mov ecx, dword [esi + 0x3f0]
cmp ecx, edx
mov dword [esp + 0x28], ecx
je 0x403535
mov ecx, dword [esi + 0x3ec]
lea edx, [eax + 0x98]
mov dword [edx], ecx
mov ecx, dword [esp + 0x28]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0xac]
mov edi, 1
mov dword [edx + 8], edi
mov dword [edx + 0xc], ecx
xor edx, edx
mov edi, dword [esi + 0x3f8]
cmp edi, edx
je 0x403561
mov ecx, dword [esi + 0x3f4]
add eax, 0xa8
mov dword [eax], ecx
mov edx, 1
mov dword [eax + 4], edi
mov dword [eax + 8], edx
mov edx, dword [esp + 0xac]
mov dword [eax + 0xc], edx
mov eax, dword [esi + 0x8600]
test eax, eax
jne 0x4038b9
mov eax, dword [esi + 0x598d4]
mov cl, byte [eax + 0x65]
test cl, cl
je 0x4036e4
cmp dword [esi + 0x350], 0xc
jb 0x4036d0
mov eax, dword [esi]
push eax
push 0xc
lea ecx, [esp + 0x88]
push 1
push ecx
call fcn.00487020
add esp, 0x10
xor edx, edx
mov edi, 0x69525c
lea esi, [esp + 0x86]
mov ecx, 5
repe cmpsb byte [esi], byte es:[edi]
mov ecx, dword [esp + 0x5c]
mov eax, edx
mov edx, dword [ecx + 0x350]
mov ecx, dword [ecx + 0x598d4]
setne al
push 0
mov dword [esp + 0x2c], eax
neg eax
sbb eax, eax
and eax, 0x56c
add eax, edx
push eax
add ecx, 0x18
call fcn.00499780
test eax, eax
mov esi, dword [esp + 0x5c]
jne 0x4036d0
mov eax, dword [esi + 0x598d4]
mov edi, dword [eax + 0x1c]
test edi, edi
jne 0x40361c
mov ecx, dword [esi + 8]
push str.jpeg_thumb__
push ecx
push str._s:_Out_of_memory_in__s_n
push 0x69aee0
call fcn.00487674
add esp, 0x10
mov eax, dword [esp + 0x28]
mov byte [edi], 0xff
inc edi
mov byte [edi], 0xd8
inc edi
test eax, eax
je 0x403690
mov eax, dword [0x695240]
mov edx, edi
mov dword [edx], eax
mov ecx, dword [0x695244]
mov dword [edx + 4], ecx
mov ax, word [0x695248]
push 0x568
mov word [edx + 8], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0
lea ecx, [esp + 0x164]
mov word [edi + 2], ax
push ecx
add edi, 0xa
mov ecx, esi
mov dword [esp + 0x24], edi
call fcn.0042cf40
mov eax, dword [esp + 0x1c]
mov ecx, 0x158
lea esi, [esp + 0x160]
add eax, 0x560
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x1c], eax
mov edi, eax
mov eax, dword [esp + 0x82]
mov edx, edi
mov dword [edx], eax
mov ecx, dword [esp + 0x86]
mov dword [edx + 4], ecx
mov ax, word [esp + 0x8a]
mov word [edx + 8], ax
mov ecx, dword [esi]
mov edx, dword [esi + 0x350]
push ecx
sub edx, 0xc
push edx
push 1
add edi, 0xa
push edi
call fcn.00487020
mov esi, dword [esp + 0x6c]
add esp, 0x10
mov eax, dword [esi + 0x598d4]
mov ecx, dword [esi + 0x450]
mov dword [eax + 0x70], ecx
jmp 0x4038b9
add eax, 0x20
push eax
mov ecx, esi
call fcn.0042d890
mov eax, dword [esi + 0x460]
test eax, eax
jne 0x403709
cmp dword [esi + 0x464], 0x3ff00000
je 0x4038b9
push 0xffffffffffffffff
lea ecx, [esp + 0xcc]
call fcn.00495350
mov edx, dword [esi + 0x598d4]
add edx, 0x20
push edx
lea ecx, [esp + 0xa4]
call fcn.00499ad0
movzx eax, word [esi + 0x43c]
movzx ecx, word [esi + 0x43e]
push 0
push eax
push ecx
mov ecx, dword [esi + 0x598d4]
add ecx, 0x20
call fcn.0049a5c0
mov edi, eax
test edi, edi
je 0x4037b8
lea ecx, [esp + 0xa0]
call fcn.00499ac0
lea ecx, [esp + 0x120]
call fcn.004996f0
lea ecx, [esp + 0x118]
call fcn.004996f0
lea ecx, [esp + 0x110]
call fcn.00453480
mov eax, dword [esp + 0x108]
test eax, eax
je 0x403797
push eax
call fcn.00499410
add esp, 4
mov edx, dword [esp + 0x10c]
and edx, 1
mov dword [esp + 0x108], 0
mov dword [esp + 0x10c], edx
jmp 0x403866
mov eax, dword [esi + 0x598d4]
mov edx, dword [eax + 0x3c]
mov ecx, dword [eax + 0x2c]
mov edi, dword [eax + 0x38]
add eax, 0x20
push 0
add ecx, edx
mov dword [esp + 0x2c], edx
mov edx, dword [eax + 8]
push 0
push 0
add edx, edi
push 0
mov dword [esp + 0x98], edx
mov dword [esp + 0x9c], ecx
lea edx, [esp + 0x90]
push edx
lea ecx, [esp + 0xb4]
push ecx
sub esp, 8
mov dword [esp + 0xa0], edi
mov edi, dword [esp + 0x48]
mov ecx, esp
push eax
mov dword [esp + 0xa8], edi
call fcn.00403ad0
lea ecx, [esp + 0xe8]
call fcn.00497d20
lea ecx, [esp + 0xa0]
mov edi, eax
call fcn.00499ac0
test edi, edi
je 0x4038ad
lea ecx, [esp + 0x120]
call fcn.004996f0
lea ecx, [esp + 0x118]
call fcn.004996f0
lea ecx, [esp + 0x110]
call fcn.00453480
lea ecx, [esp + 0x108]
call fcn.00453480
lea ecx, [esp + 0x100]
call fcn.004996f0
lea ecx, [esp + 0xf8]
call fcn.004996f0
mov eax, dword [esp + 0x64]
test eax, eax
je 0x40389a
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4038a3
lea ecx, [esp + 0x64]
call fcn.004a11c0
lea ecx, [esp + 0x64]
call fcn.004a0a50
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
lea ecx, [esp + 0xc8]
call fcn.0042d820
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4038c9
push eax
call fcn.00487297
add esp, 4
mov eax, dword [esi + 0x360]
test eax, eax
je 0x4038dc
push eax
call fcn.00487297
add esp, 4
mov eax, dword [esi + 0x488]
test eax, eax
je 0x4038ef
push eax
call fcn.00487297
add esp, 4
mov eax, dword [esi + 0x36c]
test eax, eax
je 0x40391c
mov edx, dword [esi + 0x368]
mov ecx, dword [esi + 0x39c]
inc edx
mov eax, edx
cmp eax, ecx
mov dword [esi + 0x368], edx
jb 0x40391c
mov dword [esi + 0x368], 0
mov eax, dword [esp + 0x60]
test eax, eax
jne 0x40393b
mov esi, dword [esi + 0x866c]
test esi, esi
je 0x40393b
cmp dword [esi], 0
je 0x40393b
mov dword [esp + 0x60], 0xf4242
mov eax, dword [esp + 0x64]
test eax, eax
je 0x403957
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x403960
lea ecx, [esp + 0x64]
call fcn.004a11c0
lea ecx, [esp + 0x64]
call fcn.004a0a50
mov eax, dword [esp + 0x60]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc