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

Disassembly:
sub esp, 0x64
mov edx, dword [esp + 0x6c]
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 0x1c], ebp
push esi
push edi
test edx, edx
je 0x1003f607
cmp word [ebp + 0xe], 4
mov dword [esp + 0x3c], 0
jne 0x1003f3d2
push dword [esp + 0x80]
call sym.FreeImage32.dll__FreeImage_Clone_4
mov esi, eax
mov dword [esp + 0x3c], esi
test esi, esi
je 0x1003f607
push esi
mov dword [esp + 0x14], esi
call sym.FreeImage32.dll__FreeImage_Invert_4
mov edx, dword [esp + 0x7c]
jmp 0x1003f3dd
mov eax, dword [esp + 0x80]
mov dword [esp + 0x10], eax
movzx ecx, word [ebp + 0xc]
xor ebx, ebx
mov eax, dword [ebp + 0xb0]
cmp cx, 8
setle bl
test eax, 0x100
je 0x1003f3fb
xor ebx, ebx
jmp 0x1003f410
test eax, 0x200
je 0x1003f410
xor eax, eax
mov ebx, 1
cmp cx, 0x10
cmovg ebx, eax
mov ax, bx
mov ch, al
mov cl, ah
push edx
movzx eax, cx
mov dword [esp + 0x64], eax
lea eax, [esp + 0x64]
push 1
push 2
push eax
mov eax, dword [esp + 0x88]
mov eax, dword [eax + 4]
call eax
cmp eax, 1
jne 0x1003f607
movsx eax, word [ebp + 2]
mov edx, 1
mov edi, dword [ebp + 4]
mov esi, dword [ebp + 8]
mov dword [esp + 0x1c], eax
movzx eax, word [ebp + 0xc]
mov ecx, eax
mov dword [esp + 0x18], edi
cwde
mov ebp, eax
shr ebp, 3
cmp eax, edx
cmove ebp, edx
mov dword [esp + 0x2c], ebp
cmp cx, dx
jne 0x1003f476
lea ebp, [esi + 7]
shr ebp, 3
jmp 0x1003f479
imul ebp, esi
mov dword [esp + 0x40], ebp
cmp eax, 1
jne 0x1003f488
mov dword [esp + 0x38], edx
jmp 0x1003f4bb
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1003f4b2
mov edx, dword [eax]
mov eax, 0x10
lea ecx, [edx + 0x130]
and ecx, 0xf
sub eax, ecx
neg ecx
sbb ecx, ecx
and ecx, eax
movzx eax, word [edx + ecx + 0x146]
jmp 0x1003f4b4
xor eax, eax
shr eax, 3
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1003f516
mov eax, dword [eax]
cmp dword [eax + 0x128], 0
je 0x1003f4da
mov eax, dword [eax + 0x12c]
mov dword [esp + 0x28], eax
jmp 0x1003f51e
add eax, 0x130
mov edx, eax
and edx, 0xf
je 0x1003f4f5
mov ecx, 0x10
sub ecx, edx
mov edx, eax
mov eax, dword [ecx + eax + 0xc]
jmp 0x1003f4fc
mov edx, eax
xor ecx, ecx
mov eax, dword [eax + 0xc]
movzx ecx, word [edx + ecx + 0x16]
imul ecx, eax
add ecx, 7
shr ecx, 3
add ecx, 3
and ecx, 0xfffffffc
mov dword [esp + 0x28], ecx
jmp 0x1003f51e
mov dword [esp + 0x28], 0
lea eax, [edi - 1]
push eax
mov eax, dword [esp + 0x14]
push eax
call sym.FreeImage32.dll__FreeImage_GetScanLine_8
push ebp
mov dword [esp + 0x60], eax
call fcn.1026a066
add esp, 4
mov edi, eax
mov dword [esp + 0x20], edi
sub ebx, 0
je 0x1003f924
sub ebx, 1
jne 0x1003f9c1
lea ecx, [esi + 0x7e]
mov eax, 0x2040811
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 6
add ecx, ebp
push ecx
call fcn.1026a066
mov esi, dword [esp + 0x20]
xor ecx, ecx
mov ebx, dword [esp + 0x1c]
mov edx, 4
imul esi, ebx
mov dword [esp + 0x38], eax
push 0x103d71d5
mov eax, esi
mov dword [esp + 0x1c], esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1026a06f
add esp, 0xc
mov dword [esp + 0x80], eax
test eax, eax
je 0x1003fae4
lea ecx, [esi*4]
push ecx
push 0
push eax
mov dword [esp + 0x64], ecx
call fcn.1026c8e0
mov eax, dword [esp + 0x84]
add esp, 0xc
mov esi, dword [esp + 0x7c]
mov eax, dword [eax + 0xc]
push esi
call eax
mov edx, dword [esp + 0x24]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x78]
push esi
cmp word [edx], 1
push 1
mov ecx, dword [eax + 4]
jne 0x1003f613
mov eax, dword [esp + 0x1c]
add eax, eax
push eax
push dword [esp + 0x8c]
mov dword [esp + 0x64], eax
call ecx
cmp eax, 1
je 0x1003f62f
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x64
ret 0xc
push dword [esp + 0x60]
push dword [esp + 0x8c]
call ecx
cmp eax, 1
jne 0x1003f607
mov eax, dword [esp + 0x14]
add eax, eax
mov dword [esp + 0x54], eax
xor edx, edx
mov dword [esp + 0x50], edx
lea esi, [edx + 2]
cmp dword [esp + 0x1c], edx
jbe 0x1003f7c1
mov eax, dword [esp + 0x80]
mov dword [esp + 0x30], eax
nop dword [eax]
mov eax, dword [esp + 0x10]
mov ecx, edx
test eax, eax
je 0x1003f679
mov eax, dword [eax]
cmp dword [eax], 1
jne 0x1003f679
mov eax, dword [esp + 0x24]
cmp word [eax + 0xe], 3
jne 0x1003f679
test edx, edx
je 0x1003f675
cmp edx, 2
jne 0x1003f679
mov ecx, esi
sub ecx, edx
mov eax, dword [esp + 0x2c]
imul ecx, eax
mov dword [esp + 0x44], 0
add ecx, dword [esp + 0x5c]
mov dword [esp + 0x4c], ecx
test ebx, ebx
je 0x1003f7a7
mov edx, dword [esp + 0x30]
mov dword [esp + 0x48], edx
push eax
push dword [esp + 0x3c]
push ebp
push ecx
push edi
call fcn.1003f2b0
mov eax, dword [esp + 0x34]
mov edi, ebp
mov esi, dword [esp + 0x20]
mov ebx, eax
test ebp, ebp
je 0x1003f749
lea ecx, [esi + 1]
cmp edi, 2
jb 0x1003f6f7
mov dl, byte [esi]
cmp dl, byte [ecx]
jne 0x1003f6f7
mov eax, 2
cmp eax, edi
jge 0x1003f6e3
cmp dl, byte [eax + esi]
jne 0x1003f6e3
inc eax
cmp eax, 0x7f
jl 0x1003f6d4
mov cl, 1
sub cl, al
mov byte [ebx], cl
mov cl, byte [esi]
add esi, eax
mov byte [ebx + 1], cl
add ebx, 2
sub edi, eax
jmp 0x1003f73d
mov ebp, 2
mov edx, 1
sub ebp, esi
cmp edx, edi
jge 0x1003f721
lea eax, [ecx + ebp]
cmp eax, edi
jge 0x1003f71a
mov al, byte [ecx]
cmp al, byte [ecx + 1]
jne 0x1003f71a
cmp al, byte [ecx + 2]
je 0x1003f721
inc edx
inc ecx
cmp edx, 0x7f
jl 0x1003f703
lea eax, [edx - 1]
mov byte [ebx], al
inc ebx
test edx, edx
jle 0x1003f73b
mov ecx, edx
nop dword [eax]
mov al, byte [esi]
inc esi
mov byte [ebx], al
inc ebx
sub ecx, 1
jne 0x1003f730
sub edi, edx
test edi, edi
jne 0x1003f6c1
mov ebp, dword [esp + 0x40]
mov eax, dword [esp + 0x34]
push dword [esp + 0x7c]
mov esi, dword [esp + 0x4c]
sub ebx, eax
push 1
push ebx
push eax
mov eax, dword [esp + 0x88]
mov dword [esi], ebx
mov eax, dword [eax + 4]
call eax
cmp eax, 1
jne 0x1003f607
mov eax, dword [esp + 0x44]
add esi, 4
mov ecx, dword [esp + 0x4c]
inc eax
sub ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x18]
cmp eax, ebx
mov edi, dword [esp + 0x20]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], ecx
jb 0x1003f6a0
mov edx, dword [esp + 0x50]
mov esi, 2
inc edx
lea eax, [ebx*4]
add dword [esp + 0x30], eax
mov dword [esp + 0x50], edx
cmp edx, dword [esp + 0x1c]
jb 0x1003f650
push dword [esp + 0x34]
call fcn.1026a061
mov ebp, dword [esp + 0x7c]
add esp, 4
mov ebx, dword [esp + 0x7c]
mov eax, dword [ebp + 8]
push 0
push dword [esp + 0x68]
push ebx
call eax
mov eax, dword [esp + 0x24]
xor ecx, ecx
cmp word [eax], 1
jne 0x1003f871
mov eax, dword [esp + 0x14]
mul esi
push 0x103d71d5
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1026a06f
mov esi, eax
add esp, 8
test esi, esi
je 0x1003fb05
mov edi, dword [esp + 0x14]
xor edx, edx
test edi, edi
je 0x1003f842
mov ebp, dword [esp + 0x80]
mov ax, word [ebp + edx*4]
mov ch, al
mov cl, ah
mov word [esi + edx*2], cx
inc edx
cmp edx, edi
jb 0x1003f827
mov ebp, dword [esp + 0x78]
lea eax, [edi + edi]
jmp 0x1003f846
mov eax, dword [esp + 0x54]
push ebx
push 1
push eax
mov eax, dword [ebp + 4]
push esi
call eax
cmp eax, 1
jne 0x1003f607
push esi
call fcn.1026a061
mov eax, dword [ebp + 8]
add esp, 4
push 2
push 0
push ebx
call eax
jmp 0x1003f9c1
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x80]
test esi, esi
je 0x1003f8ff
cmp esi, 0x10
jb 0x1003f8f2
cmp dword [0x10594d40], 2
jl 0x1003f8f2
mov edx, esi
lea eax, [edi + 0x20]
xor ecx, ecx
and edx, 0xfffffff0
nop dword [eax + eax]
movups xmm0, xmmword [eax - 0x20]
add ecx, 0x10
lea eax, [eax + 0x40]
pshufb xmm0, xmmword [0x103f02b0]
movups xmmword [eax - 0x60], xmm0
movups xmm0, xmmword [eax - 0x50]
pshufb xmm0, xmmword [0x103f02b0]
movups xmmword [eax - 0x50], xmm0
movups xmm0, xmmword [eax - 0x40]
pshufb xmm0, xmmword [0x103f02b0]
movups xmmword [eax - 0x40], xmm0
movups xmm0, xmmword [eax - 0x30]
pshufb xmm0, xmmword [0x103f02b0]
movups xmmword [eax - 0x30], xmm0
cmp ecx, edx
jb 0x1003f8a0
cmp ecx, esi
jae 0x1003f8ff
mov eax, dword [edi + ecx*4]
bswap eax
mov dword [edi + ecx*4], eax
inc ecx
cmp ecx, esi
jb 0x1003f8f2
mov eax, dword [ebp + 4]
push ebx
push 1
push dword [esp + 0x60]
push edi
call eax
cmp eax, 1
jne 0x1003f607
mov eax, dword [ebp + 8]
push 2
push 0
push ebx
call eax
jmp 0x1003f9c1
xor ebx, ebx
cmp dword [esp + 0x1c], ebx
jbe 0x1003f9c1
mov ecx, dword [esp + 0x18]
lea edx, [ebx + 2]
mov eax, dword [esp + 0x10]
mov esi, ebx
test eax, eax
je 0x1003f960
mov eax, dword [eax]
cmp dword [eax], 1
jne 0x1003f960
mov eax, dword [esp + 0x24]
cmp word [eax + 0xe], 3
jne 0x1003f960
test ebx, ebx
je 0x1003f95c
cmp ebx, 2
jne 0x1003f960
mov esi, edx
sub esi, ebx
mov eax, dword [esp + 0x2c]
xor edi, edi
imul esi, eax
add esi, dword [esp + 0x5c]
test ecx, ecx
je 0x1003f9b6
push eax
push dword [esp + 0x3c]
push ebp
push esi
push dword [esp + 0x30]
call fcn.1003f2b0
push dword [esp + 0x7c]
mov eax, dword [esp + 0x7c]
push 1
push ebp
push dword [esp + 0x2c]
mov eax, dword [eax + 4]
call eax
cmp eax, 1
jne 0x1003f607
sub esi, dword [esp + 0x28]
inc edi
mov eax, dword [esp + 0x2c]
cmp edi, dword [esp + 0x18]
jb 0x1003f971
mov ecx, dword [esp + 0x18]
mov edx, 2
inc ebx
cmp ebx, dword [esp + 0x1c]
jb 0x1003f937
push dword [esp + 0x20]
call fcn.1026a061
mov ebx, dword [esp + 0x40]
add esp, 4
test ebx, ebx
je 0x1003fad8
mov eax, dword [ebx]
test eax, eax
je 0x1003facf
mov eax, dword [eax + 0x118]
test eax, eax
je 0x1003f9f6
push eax
call fcn.10270662
add esp, 4
mov eax, dword [ebx]
mov ebp, dword [eax + 0x11c]
mov eax, dword [ebp]
mov ecx, dword [eax]
mov dword [esp + 0x7c], ecx
cmp ecx, eax
je 0x1003faa6
nop
mov ebx, dword [ecx + 0x14]
test ebx, ebx
je 0x1003fa8c
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov dword [esp + 0x78], eax
cmp eax, ecx
je 0x1003fa6d
mov esi, dword [eax + 0x28]
test esi, esi
je 0x1003fa5a
mov edi, dword [esi]
test edi, edi
je 0x1003fa51
push dword [edi]
call fcn.10270662
push dword [edi + 4]
call fcn.10270662
push dword [edi + 0x14]
call fcn.10270662
push dword [esi]
call fcn.10270662
add esp, 0x10
push esi
call fcn.10270662
add esp, 4
lea ecx, [esp + 0x78]
call fcn.10004970
mov ecx, dword [ebx]
mov eax, dword [esp + 0x78]
cmp eax, ecx
jne 0x1003fa23
push dword [ecx + 4]
mov ecx, ebx
push ebx
call fcn.10005180
push 0x2c
push dword [ebx]
call fcn.1026a022
push 8
push ebx
call fcn.1026a022
add esp, 0x10
lea ecx, [esp + 0x7c]
call fcn.100049d0
mov ecx, dword [esp + 0x7c]
cmp ecx, dword [ebp]
jne 0x1003fa10
mov ebx, dword [esp + 0x3c]
mov ecx, ebp
call fcn.10004620
push 8
push ebp
call fcn.1026a022
mov eax, dword [ebx]
add esp, 8
push dword [eax + 0x124]
call sym.FreeImage32.dll__FreeImage_Unload_4
push dword [ebx]
call fcn.102705e3
add esp, 4
push ebx
call fcn.10270662
add esp, 4
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x64
ret 0xc
push edi
call fcn.1026a061
add esp, 4
lea ecx, [esp + 0x68]
call fcn.1003ce20
push 0x10403434
lea eax, [esp + 0x6c]
push eax
call fcn.1026cad5
push edi
call fcn.1026a061
add esp, 4
lea ecx, [esp + 0x68]
call fcn.1003ce20
push 0x10403434
lea eax, [esp + 0x6c]
push eax
call fcn.1026cad5
int3