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

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x70
push ebx
push ebp
push esi
mov esi, dword [esp + 0x80]
push edi
test eax, eax
je 0x100346c9
mov ecx, dword [esi + 0x78]
push eax
mov eax, dword [esp + 0x8c]
and ecx, 0x8000
push 1
cmp ecx, 0x8000
mov ecx, dword [eax]
push 2
lea edx, [esp + 0x40]
sete bl
push edx
mov byte [esp + 0x26], bl
mov dword [esp + 0x44], 0
call ecx
mov dx, word [esp + 0x34]
mov ah, dl
mov al, dh
movzx ecx, ax
mov dword [esp + 0x34], ecx
test cx, cx
je 0x100346d5
cmp cx, 1
je 0x100346d5
mov edx, dword [esi + 0x7c]
movzx ecx, cx
push ecx
push str.Unsupported_compression__d
push edx
call sym.FreeImage.dll_FreeImage_OutputMessageProc
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0xc
movsx edx, word [esi]
mov edi, dword [esi + 4]
mov eax, dword [esi + 8]
mov dword [esp + 0x24], edx
movzx edx, word [esi + 0xc]
movsx ebp, dx
mov dword [esp + 0x28], edi
mov dword [esp + 0x48], ebp
cmp ebp, 1
jne 0x100346fc
mov dword [esp + 0x20], ebp
jmp 0x10034705
mov edx, ebp
shr edx, 3
mov dword [esp + 0x20], edx
movzx edx, word [esi + 0xc]
cmp dx, 1
jne 0x10034717
lea edx, [eax + 7]
shr edx, 3
jmp 0x1003471e
mov edx, dword [esp + 0x20]
imul edx, eax
mov dword [esp + 0x30], edx
cmp cx, 1
jne 0x1003474b
cmp ebp, 0x10
jbe 0x1003474b
mov eax, dword [esi + 0x7c]
push ebp
push str.Unsupported_RLE_with_depth__d
push eax
call sym.FreeImage.dll_FreeImage_OutputMessageProc
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0xc
movzx edx, word [esi + 0xe]
mov dword [esp + 0x38], edx
cmp dx, 7
jne 0x10034769
cmp dword [esp + 0x24], 3
jae 0x10034769
mov edx, 1
mov dword [esp + 0x38], edx
movsx ecx, dx
mov byte [esp + 0x17], 0
cmp ecx, 9
ja case.0x10034781.5
movzx ecx, byte [ecx + 0x100350cc]
jmp dword [ecx*4 + 0x100350c0]
mov esi, 1
mov dword [esp + 0x2c], esi
cmp ebp, 0x10
je 0x10034914
cmp ebp, 0x20
je 0x100347bb
push 0
push 0
push 0
push ebp
push edi
movzx edx, bl
push eax
push edx
mov byte [esp + 0x33], 1
call sym.FreeImage.dll__FreeImage_AllocateHeader_28
jmp 0x10034afb
cdq
movzx esi, bl
mov ebx, eax
xor ebx, edx
sub ebx, edx
mov eax, edi
cdq
mov ebp, eax
xor ebp, edx
sub ebp, edx
mov dword [esp + 0x5c], esi
test ebx, ebx
jle 0x10034b06
test ebp, ebp
jle 0x10034b06
push 4
call fcn.1014f4ab
mov edi, eax
add esp, 4
test edi, edi
je 0x10034b06
xor eax, eax
push ebx
push esi
lea ecx, [eax + 0x20]
mov edx, ebp
call fcn.100013a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x1003481b
push edi
call fcn.1014f3ce
add esp, 4
jmp 0x10034b06
push 0x10
push esi
call fcn.1014f831
add esp, 8
mov dword [edi], eax
test eax, eax
je 0x1003480d
push esi
push 0
push eax
call fcn.101527d0
mov esi, dword [edi]
xor eax, eax
add esp, 0xc
mov dword [esi], 6
mov dword [esi + 4], eax
push 0x100
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
lea eax, [esi + 0x10]
push 0xff
push eax
call fcn.101527d0
add esp, 0xc
xor edx, edx
xor ecx, ecx
cmp dword [esp + 0x5c], ecx
push edi
sete dl
mov dword [esi + 0x120], edx
call sym.FreeImage.dll__FreeImage_GetICCProfile_4
push 0x1029a760
push 0x20
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov word [eax], cx
call fcn.1014f8fe
add esp, 8
mov dword [esp + 0x4c], eax
test eax, eax
je 0x100348a6
mov edx, eax
push edx
call fcn.10003cb0
mov eax, dword [esp + 0x4c]
jmp 0x100348a8
xor eax, eax
push edi
mov dword [esi + 0x11c], eax
mov dword [esi + 0x124], 0
call sym.FreeImage.dll__FreeImage_GetInfoHeader_4
mov esi, eax
mov eax, 1
mov ecx, 0x20
mov dword [esi], 0x28
mov dword [esi + 4], ebx
mov dword [esi + 8], ebp
mov word [esi + 0xc], ax
mov dword [esi + 0x10], 0
mov word [esi + 0xe], cx
call fcn.10001380
mov bl, byte [esp + 0x16]
mov ebp, dword [esp + 0x48]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov eax, 0xb13
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x28]
jmp 0x10034aff
cdq
movzx esi, bl
mov ebx, eax
xor ebx, edx
sub ebx, edx
mov eax, edi
cdq
mov ebp, eax
xor ebp, edx
sub ebp, edx
mov dword [esp + 0x5c], esi
test ebx, ebx
jle 0x10034b06
test ebp, ebp
jle 0x10034b06
push 4
call fcn.1014f4ab
mov edi, eax
add esp, 4
test edi, edi
je 0x10034b06
xor eax, eax
push ebx
push esi
lea ecx, [eax + 0x10]
mov edx, ebp
call fcn.100013a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x10034974
push edi
call fcn.1014f3ce
add esp, 4
jmp 0x10034b06
push 0x10
push esi
call fcn.1014f831
add esp, 8
mov dword [edi], eax
test eax, eax
je 0x1003480d
push esi
push 0
push eax
call fcn.101527d0
mov esi, dword [edi]
add esp, 0xc
xor eax, eax
push 0x100
lea edx, [esi + 0x10]
mov dword [esi], 2
mov dword [esi + 4], eax
push 0xff
push edx
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
call fcn.101527d0
xor eax, eax
add esp, 0xc
xor ecx, ecx
cmp dword [esp + 0x5c], ecx
push edi
sete al
mov dword [esi + 0x120], eax
call sym.FreeImage.dll__FreeImage_GetICCProfile_4
push 0x1029a760
push 0x20
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov word [eax], cx
call fcn.1014f8fe
add esp, 8
mov dword [esp + 0x4c], eax
test eax, eax
je 0x10034a03
mov edx, eax
push edx
call fcn.10003cb0
mov eax, dword [esp + 0x4c]
jmp 0x10034a05
xor eax, eax
push edi
mov dword [esi + 0x11c], eax
mov dword [esi + 0x124], 0
call sym.FreeImage.dll__FreeImage_GetInfoHeader_4
mov esi, eax
mov eax, 1
mov ecx, 0x10
mov dword [esi], 0x28
mov dword [esi + 4], ebx
mov dword [esi + 8], ebp
mov word [esi + 0xc], ax
mov dword [esi + 0x10], 0
mov word [esi + 0xe], cx
call fcn.10001380
mov bl, byte [esp + 0x16]
mov ebp, dword [esp + 0x48]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov eax, 0xb13
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x28]
jmp 0x10034aff
cmp dx, 7
jne 0x10034aa7
test bl, bl
jne 0x10034aa7
mov esi, 4
mov dword [esp + 0x2c], esi
push 0
push 0
mov ecx, esi
push 0
cmp ebp, 0x10
je 0x10034ae3
cmp ebp, 0x20
je 0x10034ad6
imul ecx, ebp
push ecx
push edi
movzx edx, bl
push eax
push edx
call sym.FreeImage.dll__FreeImage_AllocateHeader_28
jmp 0x10034afb
mov esi, 4
cmp dword [esp + 0x24], esi
jae 0x10034a80
mov esi, dword [esp + 0x24]
mov dword [esp + 0x2c], esi
cmp esi, 3
jae 0x10034a84
push 0x10246d7c
lea edx, [esp + 0x64]
push edx
mov dword [esp + 0x68], str.Invalid_number_of_channels
call fcn.101525f9
shl ecx, 5
cmp esi, 4
sbb edx, edx
add edx, 0xc
jmp 0x10034aee
shl ecx, 4
cmp esi, 4
sbb edx, edx
add edx, 0xa
push ecx
push edi
push eax
movzx eax, bl
push edx
push eax
call sym.FreeImage.dll__FreeImage_AllocateHeaderT_32
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0
jne 0x10034b1d
push 0x10246d38
lea ecx, [esp + 0x64]
push ecx
mov dword [esp + 0x68], str.DIB_allocation_failed__maybe_caused_by_an_invalid_image_size_or_by_a_lack_of_memory
call fcn.101525f9
mov edx, dword [esp + 0x84]
mov eax, dword [edx + 0x5c]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call sym.FreeImage.dll__FreeImage_SetThumbnail_8
test bl, bl
je 0x10034b44
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0xc
mov ebx, dword [esp + 0x18]
cmp ebp, 1
jne 0x10034b53
mov dword [esp + 0x4c], ebp
jmp 0x10034b60
push ebx
call sym.FreeImage.dll__FreeImage_GetBPP_4
shr eax, 3
mov dword [esp + 0x4c], eax
push ebx
call sym.FreeImage.dll__FreeImage_GetPitch_4
lea edx, [edi - 1]
push edx
push ebx
mov dword [esp + 0x64], eax
call sym.FreeImage.dll__FreeImage_GetScanLine_8
mov ebp, eax
mov eax, dword [esp + 0x30]
push eax
mov dword [esp + 0x5c], ebp
call fcn.1014ed96
mov dword [esp + 0x20], eax
movzx eax, word [esp + 0x38]
add esp, 4
sub eax, 0
je 0x10034e52
sub eax, 1
jne 0x10034f2b
mov ebp, dword [esp + 0x24]
mov esi, ebp
imul esi, edi
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
push 0x1029a760
neg ecx
or ecx, eax
push ecx
call fcn.1015129d
mov ebx, eax
add esp, 8
mov dword [esp + 0x48], ebx
test ebx, ebx
jne 0x10034c08
mov eax, dword [esp + 0x18]
push eax
call sym.FreeImage.dll__FreeImage_Unload_4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10034bf0
push eax
call fcn.101512a8
add esp, 4
lea ecx, [esp + 0x68]
call fcn.10033560
push 0x10246ce4
lea ecx, [esp + 0x6c]
push ecx
call fcn.101525f9
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x88]
mov ecx, dword [eax]
push edx
push esi
push 2
push ebx
call ecx
xor edx, edx
test ebp, ebp
jbe 0x10034c6d
mov dword [esp + 0x3c], ebx
lea esp, [esp]
test edi, edi
jbe 0x10034c61
mov eax, dword [esp + 0x3c]
mov esi, edi
lea ebx, [ebx]
mov cx, word [eax]
mov bh, cl
mov bl, ch
movzx ecx, bx
mov word [eax], bx
cmp dx, cx
jae 0x10034c55
movzx edx, cx
add eax, 2
sub esi, 1
jne 0x10034c40
mov ebx, dword [esp + 0x48]
lea eax, [edi + edi]
add dword [esp + 0x3c], eax
sub ebp, 1
jne 0x10034c30
movzx edx, dx
push 0x1029a760
push edx
call fcn.1015129d
mov esi, eax
add esp, 8
mov dword [esp + 0x50], esi
test esi, esi
jne 0x10034cc4
mov eax, dword [esp + 0x18]
push eax
call sym.FreeImage.dll__FreeImage_Unload_4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10034ca3
push eax
call fcn.101512a8
add esp, 4
push ebx
call fcn.101512a8
add esp, 4
lea ecx, [esp + 0x74]
call fcn.10033560
push 0x10246ce4
lea ecx, [esp + 0x78]
push ecx
call fcn.101525f9
cmp dword [esp + 0x24], 0
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
lea ebx, [eax + edx]
mov dword [esp + 0x40], 0
jbe 0x10034e2e
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x48]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x44], edx
cmp dword [esp + 0x28], 0
mov dword [esp + 0x54], 0
jbe 0x10034e05
mov eax, dword [esp + 0x44]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x8c]
mov edx, dword [esp + 0x3c]
movzx eax, word [edx]
push ecx
mov ecx, dword [esp + 0x8c]
mov edx, dword [ecx]
push 1
push eax
push esi
call edx
mov eax, dword [esp + 0x1c]
mov edi, esi
cmp eax, ebx
jae 0x10034da2
movzx esi, byte [edi]
inc edi
cmp esi, 0x80
jge 0x10034d71
inc esi
lea ebp, [esi + eax]
cmp ebp, ebx
jbe 0x10034d60
mov ecx, ebx
sub ecx, eax
push ecx
push edi
push eax
call fcn.101541d0
add esp, 0xc
add edi, esi
jmp 0x10034d98
mov ecx, esi
push ecx
push edi
push eax
call fcn.101541d0
add esp, 0xc
add edi, esi
jmp 0x10034d98
jle 0x10034d9a
xor esi, 0xff
add esi, 2
mov ecx, esi
lea ebp, [ecx + eax]
cmp ebp, ebx
jbe 0x10034d89
mov ecx, ebx
sub ecx, eax
movzx edx, byte [edi]
push ecx
push edx
push eax
inc edi
call fcn.101527d0
add esp, 0xc
mov eax, ebp
cmp eax, ebx
jb 0x10034d39
mov esi, dword [esp + 0x50]
mov eax, dword [esp + 0x40]
cmp eax, dword [esp + 0x2c]
jae 0x10034e05
mov edi, dword [esp + 0x1c]
cmp edi, ebx
jae 0x10034de5
mov esi, dword [esp + 0x30]
xor eax, eax
cmp dword [esp + 0x20], eax
jbe 0x10034dd5
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + edi - 1]
mov dl, byte [ecx]
mov byte [esi + eax], dl
inc eax
dec ecx
cmp eax, dword [esp + 0x20]
jb 0x10034dc8
add edi, dword [esp + 0x20]
add esi, dword [esp + 0x4c]
cmp edi, ebx
jb 0x10034db8
mov esi, dword [esp + 0x50]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x5c]
add dword [esp + 0x3c], 2
sub dword [esp + 0x30], ecx
inc eax
mov dword [esp + 0x54], eax
cmp eax, dword [esp + 0x28]
jb 0x10034d11
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x28]
add ecx, dword [esp + 0x20]
add eax, eax
add dword [esp + 0x44], eax
inc edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x58], ecx
cmp edx, dword [esp + 0x24]
jb 0x10034cf2
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10034e3f
push eax
call fcn.101512a8
add esp, 4
mov edx, dword [esp + 0x48]
push edx
call fcn.101512a8
add esp, 4
push esi
jmp 0x10034f23
cmp dword [esp + 0x24], 0
mov dword [esp + 0x48], 0
jbe 0x10034f17
mov dword [esp + 0x44], ebp
mov ebp, dword [esp + 0x1c]
jmp 0x10034e78
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
cmp dword [esp + 0x48], esi
jae 0x10034f17
test edi, edi
jbe 0x10034efc
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x28]
lea ebx, [eax + ebp]
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ecx
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x88]
push edx
mov edx, dword [ecx]
push 1
push eax
push ebp
call edx
mov edi, ebp
cmp ebp, ebx
jae 0x10034ee9
mov ebp, dword [esp + 0x20]
xor eax, eax
test ebp, ebp
jbe 0x10034edb
lea ecx, [edi + ebp - 1]
mov dl, byte [ecx]
mov byte [esi + eax], dl
inc eax
dec ecx
cmp eax, ebp
jb 0x10034ed0
add esi, dword [esp + 0x4c]
add edi, ebp
cmp edi, ebx
jb 0x10034ec6
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x58]
sub esi, dword [esp + 0x5c]
sub dword [esp + 0x54], 1
mov dword [esp + 0x58], esi
jne 0x10034ea1
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x20]
add dword [esp + 0x44], ecx
inc eax
mov dword [esp + 0x48], eax
cmp eax, dword [esp + 0x24]
jb 0x10034e70
cmp dword [esp + 0x1c], 0
je 0x10034f2b
mov edx, dword [esp + 0x1c]
push edx
call fcn.101512a8
add esp, 4
mov eax, dword [esp + 0x38]
cmp ax, 4
je 0x10035022
cmp ax, 7
je 0x10035013
cmp ax, 9
jne 0x10034f6f
mov eax, dword [esp + 0x84]
test byte [eax + 0x78], 2
jne 0x10034f6f
mov ebx, dword [esp + 0x18]
push ebx
call fcn.10035b60
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0xc
cmp byte [esp + 0x17], 0
mov ebx, dword [esp + 0x18]
je 0x10034ff1
push ebx
call sym.FreeImage.dll__FreeImage_GetPalette_4
test eax, eax
je 0x10034ff1
mov eax, dword [esp + 0x38]
test ax, ax
jne 0x10034fb1
mov edi, 0xffffff
xor esi, esi
push ebx
call sym.FreeImage.dll__FreeImage_GetPalette_4
mov dword [eax + esi], edi
add esi, 4
sub edi, 0xffffff
cmp esi, 8
jb 0x10034f98
jmp 0x10034ff1
cmp ax, 2
jne 0x10034ff1
mov eax, dword [esp + 0x84]
cmp dword [eax + 0x14], 0
je 0x10034fe0
cmp dword [eax + 0x10], 0x300
lea esi, [eax + 0x10]
jne 0x10034fe0
cmp word [eax + 0x68], 0
jl 0x10034fe0
mov eax, ebx
call fcn.10033720
jmp 0x10034ff1
mov ecx, dword [eax + 0x7c]
push str.Indexed_image_has_no_palette._Using_the_default_grayscale_one.
push ecx
call sym.FreeImage.dll_FreeImage_OutputMessageProc
add esp, 8
push ebx
call sym.FreeImage.dll__FreeImage_GetImageType_4
cmp eax, 1
jne 0x1003509c
mov eax, ebx
call fcn.100356e0
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0xc
mov ebx, dword [esp + 0x18]
push ebx
call fcn.10033f00
add esp, 4
jmp 0x1003502c
mov ebx, dword [esp + 0x18]
push ebx
call sym.FreeImage.dll__FreeImage_Invert_4
mov edx, dword [esp + 0x84]
test byte [edx + 0x78], 1
je 0x10035061
cmp word [esp + 0x38], 7
jne 0x1003509c
push 0
push 0
push ebx
call sym.FreeImage.dll__FreeImage_CreateICCProfile_12
push ebx
call sym.FreeImage.dll__FreeImage_GetICCProfile_4
or word [eax], 1
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0xc
push ebx
call fcn.10035790
mov esi, dword [esp + 0x88]
add esp, 4
add esi, 0x60
call fcn.10033e90
mov eax, dword [esp + 0x24]
cmp eax, 4
je 0x10035087
cmp eax, 3
jne 0x1003509c
mov esi, ebx
call fcn.10035c60
mov esi, eax
test esi, esi
je 0x1003509c
push ebx
call sym.FreeImage.dll__FreeImage_Unload_4
mov ebx, esi
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x70
ret 0xc
push 0x10246d7c
lea eax, [esp + 0x68]
push eax
mov dword [esp + 0x6c], str.Unsupported_color_mode
call fcn.101525f9
nop
mov byte [edi + 3], al
adc byte [ecx + 74], dh
add edx, dword [eax]
test al, 0x50
add edx, dword [eax]
add byte [eax], al
add byte [ecx], al
add dword [edx], eax
add al, byte [ecx]
add byte [ecx], al
int3